Repository: google/go-github
Pull request #1886 (2021-06-08 14:54:28)

Parse 'reviewed' event object 'state' property
The Timeline Events API can return a `reviewed` event object when listing events for a pull request. One of the properties of [this object](https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#reviewed) is `state`, which tells you the state of a submitted review.

The values `state` can have are:

- `commented`
- `changes_requested`
- `approved`

This PR adds this field to the `Timeline` struct defined in `issues_timeline.go` to make it possible to tell the state of a review when listing pull request events.

google-cla[bot]: 
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: **Please visit <https://cla.developers.google.com/> to sign.**

Once you've signed (or fixed any issues), please reply here with `@googlebot I signed it!` and we'll verify it.

----

#### What to do if you already signed the CLA

##### Individual signers

*   It's possible we don't have your GitHub username or you're using a different email address on your commit. Check [your existing CLA data](https://cla.developers.google.com/clas) and verify that your [email is set on your git commits](https://help.github.com/articles/setting-your-email-in-git/).

##### Corporate signers

*   Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to [go/cla#troubleshoot](http://go/cla#troubleshoot) ([Public version](https://opensource.google/docs/cla/#troubleshoot)).
*   The email used to register you as an authorized contributor must be the email used for the Git commit. Check [your existing CLA data](https://cla.developers.google.com/clas) and verify that your [email is set on your git commits](https://help.github.com/articles/setting-your-email-in-git/).
*   The email used to register you as an authorized contributor must also be [attached to your GitHub account](https://github.com/settings/emails).
		

ℹ️ **Googlers: [Go here](https://goto.google.com/prinfo/https%3A%2F%2Fgithub.com%2Fgoogle%2Fgo-github%2Fpull%2F1886) for more info**.

<!-- need_sender_cla -->
campesel: @googlebot I signed it!
campesel: Merging this PR would fix issue #1885.
campesel: @gmlewis Thanks for the approval!

Patch:
diff --git a/README.md b/README.md
index 7d865d89..6c72cdb3 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # go-github #
 
 [![go-github release (latest SemVer)](https://img.shields.io/github/v/release/google/go-github?sort=semver)](https://github.com/google/go-github/releases)
-[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v35/github)
+[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v36/github)
 [![Test Status](https://github.com/google/go-github/workflows/tests/badge.svg)](https://github.com/google/go-github/actions?query=workflow%3Atests)
 [![Test Coverage](https://codecov.io/gh/google/go-github/branch/master/graph/badge.svg)](https://codecov.io/gh/google/go-github)
 [![Discuss at go-github@googlegroups.com](https://img.shields.io/badge/discuss-go--github%40googlegroups.com-blue.svg)](https://groups.google.com/group/go-github)
@@ -24,7 +24,7 @@ If you're interested in using the [GraphQL API v4][], the recommended library is
 go-github is compatible with modern Go releases in module mode, with Go installed:
 
 ```bash
-go get github.com/google/go-github/v35
+go get github.com/google/go-github/v36
 ```
 
 will resolve and add the package to the current development module, along with its dependencies.
@@ -32,21 +32,21 @@ will resolve and add the package to the current development module, along with i
 Alternatively the same can be achieved if you use import in a package:
 
 ```go
-import "github.com/google/go-github/v35/github"
+import "github.com/google/go-github/v36/github"
 ```
 
-and run `go get` without paramters.
+and run `go get` without parameters.
 
 Finally, to use the top-of-trunk version of this repo, use the following command:
 
 ```bash
-go get github.com/google/go-github/v35@master
+go get github.com/google/go-github/v36@master
 ```
 
 ## Usage ##
 
 ```go
-import "github.com/google/go-github/v35/github"	// with go modules enabled (GO111MODULE=on or outside GOPATH)
+import "github.com/google/go-github/v36/github"	// with go modules enabled (GO111MODULE=on or outside GOPATH)
 import "github.com/google/go-github/github" // with go modules disabled
 ```
 
@@ -246,7 +246,7 @@ For complete usage of go-github, see the full [package docs][].
 [oauth2]: https://github.com/golang/oauth2
 [oauth2 docs]: https://godoc.org/golang.org/x/oauth2
 [personal API token]: https://github.com/blog/1509-personal-api-tokens
-[package docs]: https://pkg.go.dev/github.com/google/go-github/v35/github
+[package docs]: https://pkg.go.dev/github.com/google/go-github/v36/github
 [GraphQL API v4]: https://developer.github.com/v4/
 [shurcooL/githubv4]: https://github.com/shurcooL/githubv4
 
diff --git a/example/appengine/app.go b/example/appengine/app.go
index 588a2a07..893dca9d 100644
--- a/example/appengine/app.go
+++ b/example/appengine/app.go
@@ -12,7 +12,7 @@ import (
 	"net/http"
 	"os"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 	"google.golang.org/appengine"
 	"google.golang.org/appengine/log"
diff --git a/example/basicauth/main.go b/example/basicauth/main.go
index 3c7efc82..d172d9b0 100644
--- a/example/basicauth/main.go
+++ b/example/basicauth/main.go
@@ -22,7 +22,7 @@ import (
 	"strings"
 	"syscall"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/crypto/ssh/terminal"
 )
 
diff --git a/example/commitpr/main.go b/example/commitpr/main.go
index 604f4f58..856d1cb5 100644
--- a/example/commitpr/main.go
+++ b/example/commitpr/main.go
@@ -31,7 +31,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 )
 
diff --git a/example/migrations/main.go b/example/migrations/main.go
index 230cff25..8e4e8a08 100644
--- a/example/migrations/main.go
+++ b/example/migrations/main.go
@@ -12,7 +12,7 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 )
 
diff --git a/example/newrepo/main.go b/example/newrepo/main.go
index 239ccfb7..cc1525a0 100644
--- a/example/newrepo/main.go
+++ b/example/newrepo/main.go
@@ -16,7 +16,7 @@ import (
 	"log"
 	"os"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 )
 
diff --git a/example/newreposecret/go.mod b/example/newreposecret/go.mod
index 50d854c6..af3a4ea8 100644
--- a/example/newreposecret/go.mod
+++ b/example/newreposecret/go.mod
@@ -4,7 +4,7 @@ go 1.15
 
 require (
 	github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb
-	github.com/google/go-github/v35 v35.0.0
+	github.com/google/go-github/v36 v36.0.0
 	golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
 	gopkg.in/yaml.v2 v2.3.0 // indirect
 )
diff --git a/example/newreposecret/main.go b/example/newreposecret/main.go
index 928e4532..1bf50024 100644
--- a/example/newreposecret/main.go
+++ b/example/newreposecret/main.go
@@ -34,7 +34,7 @@ import (
 	"os"
 
 	sodium "github.com/GoKillers/libsodium-go/cryptobox"
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 )
 
diff --git a/example/simple/main.go b/example/simple/main.go
index ee0d5751..3b559ade 100644
--- a/example/simple/main.go
+++ b/example/simple/main.go
@@ -12,7 +12,7 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 // Fetch all the public organizations' membership of a user.
diff --git a/example/tokenauth/main.go b/example/tokenauth/main.go
index 922707c5..773f20c8 100644
--- a/example/tokenauth/main.go
+++ b/example/tokenauth/main.go
@@ -14,7 +14,7 @@ import (
 	"log"
 	"syscall"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/crypto/ssh/terminal"
 	"golang.org/x/oauth2"
 )
diff --git a/example/topics/main.go b/example/topics/main.go
index 7011b6e3..982cdcad 100644
--- a/example/topics/main.go
+++ b/example/topics/main.go
@@ -12,7 +12,7 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 // Fetch and lists all the public topics associated with the specified GitHub topic
diff --git a/github/actions_runner_groups.go b/github/actions_runner_groups.go
index 2c0459d5..5772daaa 100644
--- a/github/actions_runner_groups.go
+++ b/github/actions_runner_groups.go
@@ -217,10 +217,10 @@ func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context,
 	return s.client.Do(ctx, req, nil)
 }
 
-// ListRunerGroupRunners lists self-hosted runners that are in a specific organization group.
+// ListRunnerGroupRunners lists self-hosted runners that are in a specific organization group.
 //
 // GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization
-func (s *ActionsService) ListRunerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) {
+func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) {
 	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
 	u, err := addOptions(u, opts)
 	if err != nil {
@@ -241,11 +241,11 @@ func (s *ActionsService) ListRunerGroupRunners(ctx context.Context, org string,
 	return runners, resp, nil
 }
 
-// SetRunerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group
+// SetRunnerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group
 // with a new list of runners.
 //
 // GitHub API docs: https://docs.github.com/en/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization
-func (s *ActionsService) SetRunerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) {
+func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) {
 	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
 
 	req, err := s.client.NewRequest("PUT", u, ids)
@@ -256,10 +256,10 @@ func (s *ActionsService) SetRunerGroupRunners(ctx context.Context, org string, g
 	return s.client.Do(ctx, req, nil)
 }
 
-// AddRunerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
+// AddRunnerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
 //
 // GitHub API docs: https://docs.github.com/en/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization
-func (s *ActionsService) AddRunerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
+func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
 	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)
 
 	req, err := s.client.NewRequest("PUT", u, nil)
@@ -270,11 +270,11 @@ func (s *ActionsService) AddRunerGroupRunners(ctx context.Context, org string, g
 	return s.client.Do(ctx, req, nil)
 }
 
-// RemoveRunerGroupRunners removes a self-hosted runner from a group configured in an organization.
+// RemoveRunnerGroupRunners removes a self-hosted runner from a group configured in an organization.
 // The runner is then returned to the default group.
 //
 // GitHub API docs: https://docs.github.com/en/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization
-func (s *ActionsService) RemoveRunerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
+func (s *ActionsService) RemoveRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
 	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)
 
 	req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/github/doc.go b/github/doc.go
index def690b8..4daa64d9 100644
--- a/github/doc.go
+++ b/github/doc.go
@@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API.
 
 Usage:
 
-	import "github.com/google/go-github/v35/github"	// with go modules enabled (GO111MODULE=on or outside GOPATH)
+	import "github.com/google/go-github/v36/github"	// with go modules enabled (GO111MODULE=on or outside GOPATH)
 	import "github.com/google/go-github/github"     // with go modules disabled
 
 Construct a new GitHub client, then use the various services on the client to
diff --git a/github/gen-accessors.go b/github/gen-accessors.go
index d8d5910f..58ac3eb1 100644
--- a/github/gen-accessors.go
+++ b/github/gen-accessors.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // gen-accessors generates accessor methods for structs with pointer fields.
diff --git a/github/github-accessors.go b/github/github-accessors.go
index 1c17384e..cbe40746 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -14924,6 +14924,14 @@ func (t *Timeline) GetSource() *Source {
 	return t.Source
 }
 
+// GetState returns the State field if it's non-nil, zero value otherwise.
+func (t *Timeline) GetState() string {
+	if t == nil || t.State == nil {
+		return ""
+	}
+	return *t.State
+}
+
 // GetURL returns the URL field if it's non-nil, zero value otherwise.
 func (t *Timeline) GetURL() string {
 	if t == nil || t.URL == nil {
diff --git a/github/issues_timeline.go b/github/issues_timeline.go
index 2033a723..1fd13b12 100644
--- a/github/issues_timeline.go
+++ b/github/issues_timeline.go
@@ -81,6 +81,9 @@ type Timeline struct {
 	//     reopened
 	//       The issue was reopened by the actor.
 	//
+	//     reviewed
+	//       The pull request was reviewed.
+	//
 	//     subscribed
 	//       The actor subscribed to receive notifications for an issue.
 	//
@@ -118,6 +121,10 @@ type Timeline struct {
 	// Only provided for 'renamed' events.
 	Rename      *Rename      `json:"rename,omitempty"`
 	ProjectCard *ProjectCard `json:"project_card,omitempty"`
+	// The state of a submitted review. Can be one of: 'commented',
+	// 'changes_requested' or 'approved'.
+	// Only provided for 'reviewed' events.
+	State *string `json:"state,omitempty"`
 }
 
 // Source represents a reference's source.
diff --git a/github/with_appengine.go b/github/with_appengine.go
index 59ce26b2..9053ce10 100644
--- a/github/with_appengine.go
+++ b/github/with_appengine.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build appengine
 // +build appengine
 
 // This file provides glue for making github work on App Engine.
diff --git a/github/without_appengine.go b/github/without_appengine.go
index 6f8fdac5..0024ae41 100644
--- a/github/without_appengine.go
+++ b/github/without_appengine.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !appengine
 // +build !appengine
 
 // This file provides glue for making github work without App Engine.
diff --git a/go.mod b/go.mod
index a4d53c83..b54e4324 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/google/go-github/v35
+module github.com/google/go-github/v36
 
 require (
 	github.com/golang/protobuf v1.3.2 // indirect


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index fa61b5e3..2b354674 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -34,7 +34,7 @@ jobs:
       with:
         access_token: ${{ github.token }}
 
-    - uses: actions/setup-go@v1
+    - uses: actions/setup-go@v2
       with:
         go-version: ${{ matrix.go-version }}
     - uses: actions/checkout@v2
diff --git a/github/actions_runner_groups_test.go b/github/actions_runner_groups_test.go
index b183274e..ca24ae93 100644
--- a/github/actions_runner_groups_test.go
+++ b/github/actions_runner_groups_test.go
@@ -348,7 +348,7 @@ func TestActionsService_RemoveRepositoryAccessRunnerGroup(t *testing.T) {
 	})
 }
 
-func TestActionsService_ListRunerGroupRunners(t *testing.T) {
+func TestActionsService_ListRunnerGroupRunners(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
@@ -360,9 +360,9 @@ func TestActionsService_ListRunerGroupRunners(t *testing.T) {
 
 	opts := &ListOptions{Page: 2, PerPage: 2}
 	ctx := context.Background()
-	runners, _, err := client.Actions.ListRunerGroupRunners(ctx, "o", 2, opts)
+	runners, _, err := client.Actions.ListRunnerGroupRunners(ctx, "o", 2, opts)
 	if err != nil {
-		t.Errorf("Actions.ListRunerGroupRunners returned error: %v", err)
+		t.Errorf("Actions.ListRunnerGroupRunners returned error: %v", err)
 	}
 
 	want := &Runners{
@@ -373,17 +373,17 @@ func TestActionsService_ListRunerGroupRunners(t *testing.T) {
 		},
 	}
 	if !cmp.Equal(runners, want) {
-		t.Errorf("Actions.ListRunerGroupRunners returned %+v, want %+v", runners, want)
+		t.Errorf("Actions.ListRunnerGroupRunners returned %+v, want %+v", runners, want)
 	}
 
-	const methodName = "ListRunerGroupRunners"
+	const methodName = "ListRunnerGroupRunners"
 	testBadOptions(t, methodName, func() (err error) {
-		_, _, err = client.Actions.ListRunerGroupRunners(ctx, "\n", 2, opts)
+		_, _, err = client.Actions.ListRunnerGroupRunners(ctx, "\n", 2, opts)
 		return err
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		got, resp, err := client.Actions.ListRunerGroupRunners(ctx, "o", 2, opts)
+		got, resp, err := client.Actions.ListRunnerGroupRunners(ctx, "o", 2, opts)
 		if got != nil {
 			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
 		}
@@ -391,7 +391,7 @@ func TestActionsService_ListRunerGroupRunners(t *testing.T) {
 	})
 }
 
-func TestActionsService_SetRunerGroupRunners(t *testing.T) {
+func TestActionsService_SetRunnerGroupRunners(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
@@ -407,23 +407,23 @@ func TestActionsService_SetRunerGroupRunners(t *testing.T) {
 	}
 
 	ctx := context.Background()
-	_, err := client.Actions.SetRunerGroupRunners(ctx, "o", 2, req)
+	_, err := client.Actions.SetRunnerGroupRunners(ctx, "o", 2, req)
 	if err != nil {
-		t.Errorf("Actions.SetRunerGroupRunners returned error: %v", err)
+		t.Errorf("Actions.SetRunnerGroupRunners returned error: %v", err)
 	}
 
-	const methodName = "SetRunerGroupRunners"
+	const methodName = "SetRunnerGroupRunners"
 	testBadOptions(t, methodName, func() (err error) {
-		_, err = client.Actions.SetRunerGroupRunners(ctx, "\n", 2, req)
+		_, err = client.Actions.SetRunnerGroupRunners(ctx, "\n", 2, req)
 		return err
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		return client.Actions.SetRunerGroupRunners(ctx, "o", 2, req)
+		return client.Actions.SetRunnerGroupRunners(ctx, "o", 2, req)
 	})
 }
 
-func TestActionsService_AddRunerGroupRunners(t *testing.T) {
+func TestActionsService_AddRunnerGroupRunners(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
@@ -432,23 +432,23 @@ func TestActionsService_AddRunerGroupRunners(t *testing.T) {
 	})
 
 	ctx := context.Background()
-	_, err := client.Actions.AddRunerGroupRunners(ctx, "o", 2, 42)
+	_, err := client.Actions.AddRunnerGroupRunners(ctx, "o", 2, 42)
 	if err != nil {
-		t.Errorf("Actions.AddRunerGroupRunners returned error: %v", err)
+		t.Errorf("Actions.AddRunnerGroupRunners returned error: %v", err)
 	}
 
-	const methodName = "AddRunerGroupRunners"
+	const methodName = "AddRunnerGroupRunners"
 	testBadOptions(t, methodName, func() (err error) {
-		_, err = client.Actions.AddRunerGroupRunners(ctx, "\n", 2, 42)
+		_, err = client.Actions.AddRunnerGroupRunners(ctx, "\n", 2, 42)
 		return err
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		return client.Actions.AddRunerGroupRunners(ctx, "o", 2, 42)
+		return client.Actions.AddRunnerGroupRunners(ctx, "o", 2, 42)
 	})
 }
 
-func TestActionsService_RemoveRunerGroupRunners(t *testing.T) {
+func TestActionsService_RemoveRunnerGroupRunners(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
@@ -457,18 +457,18 @@ func TestActionsService_RemoveRunerGroupRunners(t *testing.T) {
 	})
 
 	ctx := context.Background()
-	_, err := client.Actions.RemoveRunerGroupRunners(ctx, "o", 2, 42)
+	_, err := client.Actions.RemoveRunnerGroupRunners(ctx, "o", 2, 42)
 	if err != nil {
-		t.Errorf("Actions.RemoveRunerGroupRunners returned error: %v", err)
+		t.Errorf("Actions.RemoveRunnerGroupRunners returned error: %v", err)
 	}
 
-	const methodName = "RemoveRunerGroupRunners"
+	const methodName = "RemoveRunnerGroupRunners"
 	testBadOptions(t, methodName, func() (err error) {
-		_, err = client.Actions.RemoveRunerGroupRunners(ctx, "\n", 2, 42)
+		_, err = client.Actions.RemoveRunnerGroupRunners(ctx, "\n", 2, 42)
 		return err
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		return client.Actions.RemoveRunerGroupRunners(ctx, "o", 2, 42)
+		return client.Actions.RemoveRunnerGroupRunners(ctx, "o", 2, 42)
 	})
 }
diff --git a/github/actions_secrets_test.go b/github/actions_secrets_test.go
index e38836ab..a1266d6b 100644
--- a/github/actions_secrets_test.go
+++ b/github/actions_secrets_test.go
@@ -810,3 +810,121 @@ func TestActionsService_DeleteEnvSecret(t *testing.T) {
 		return client.Actions.DeleteEnvSecret(ctx, 1, "r", "secret")
 	})
 }
+
+func TestPublicKey_Marshal(t *testing.T) {
+	testJSONMarshal(t, &PublicKey{}, "{}")
+
+	u := &PublicKey{
+		KeyID: String("kid"),
+		Key:   String("k"),
+	}
+
+	want := `{
+		"key_id": "kid",
+		"key": "k"
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestSecret_Marshal(t *testing.T) {
+	testJSONMarshal(t, &Secret{}, "{}")
+
+	u := &Secret{
+		Name:                    "n",
+		CreatedAt:               Timestamp{referenceTime},
+		UpdatedAt:               Timestamp{referenceTime},
+		Visibility:              "v",
+		SelectedRepositoriesURL: "s",
+	}
+
+	want := `{
+		"name": "n",
+		"created_at": ` + referenceTimeStr + `,
+		"updated_at": ` + referenceTimeStr + `,
+		"visibility": "v",
+		"selected_repositories_url": "s"
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestSecrets_Marshal(t *testing.T) {
+	testJSONMarshal(t, &Secrets{}, "{}")
+
+	u := &Secrets{
+		TotalCount: 1,
+		Secrets: []*Secret{
+			{
+				Name:                    "n",
+				CreatedAt:               Timestamp{referenceTime},
+				UpdatedAt:               Timestamp{referenceTime},
+				Visibility:              "v",
+				SelectedRepositoriesURL: "s"},
+		},
+	}
+
+	want := `{
+		"total_count": 1,
+		"secrets": [
+			{
+				"name": "n",
+				"created_at": ` + referenceTimeStr + `,
+				"updated_at": ` + referenceTimeStr + `,
+				"visibility": "v",
+				"selected_repositories_url": "s"
+			}
+		]
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestEncryptedSecret_Marshal(t *testing.T) {
+	testJSONMarshal(t, &EncryptedSecret{}, "{}")
+
+	u := &EncryptedSecret{
+		Name:                  "n",
+		KeyID:                 "kid",
+		EncryptedValue:        "e",
+		Visibility:            "v",
+		SelectedRepositoryIDs: []int64{1},
+	}
+
+	want := `{
+		"key_id": "kid",
+		"encrypted_value": "e",
+		"visibility": "v",
+		"selected_repository_ids": [1]
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestSelectedReposList_Marshal(t *testing.T) {
+	testJSONMarshal(t, &SelectedReposList{}, "{}")
+
+	u := &SelectedReposList{
+		TotalCount: Int(1),
+		Repositories: []*Repository{
+			{
+				ID:   Int64(1),
+				URL:  String("u"),
+				Name: String("n"),
+			},
+		},
+	}
+
+	want := `{
+		"total_count": 1,
+		"repositories": [
+			{
+				"id": 1,
+				"url": "u",
+				"name": "n"
+			}
+		]
+	}`
+
+	testJSONMarshal(t, u, want)
+}
diff --git a/github/actions_workflow_jobs_test.go b/github/actions_workflow_jobs_test.go
index 97666b3f..4062cc5b 100644
--- a/github/actions_workflow_jobs_test.go
+++ b/github/actions_workflow_jobs_test.go
@@ -203,3 +203,147 @@ func TestActionsService_GetWorkflowJobLogs_StatusMovedPermanently_followRedirect
 		t.Errorf("Actions.GetWorkflowJobLogs returned %+v, want %+v", url.String(), want)
 	}
 }
+
+func TestTaskStep_Marshal(t *testing.T) {
+	testJSONMarshal(t, &TaskStep{}, "{}")
+
+	u := &TaskStep{
+		Name:        String("n"),
+		Status:      String("s"),
+		Conclusion:  String("c"),
+		Number:      Int64(1),
+		StartedAt:   &Timestamp{referenceTime},
+		CompletedAt: &Timestamp{referenceTime},
+	}
+
+	want := `{
+		"name": "n",
+		"status": "s",
+		"conclusion": "c",
+		"number": 1,
+		"started_at": ` + referenceTimeStr + `,
+		"completed_at": ` + referenceTimeStr + `
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestWorkflowJob_Marshal(t *testing.T) {
+	testJSONMarshal(t, &WorkflowJob{}, "{}")
+
+	u := &WorkflowJob{
+		ID:          Int64(1),
+		RunID:       Int64(1),
+		RunURL:      String("r"),
+		NodeID:      String("n"),
+		HeadSHA:     String("h"),
+		URL:         String("u"),
+		HTMLURL:     String("h"),
+		Status:      String("s"),
+		Conclusion:  String("c"),
+		StartedAt:   &Timestamp{referenceTime},
+		CompletedAt: &Timestamp{referenceTime},
+		Name:        String("n"),
+		Steps: []*TaskStep{
+			{
+				Name:        String("n"),
+				Status:      String("s"),
+				Conclusion:  String("c"),
+				Number:      Int64(1),
+				StartedAt:   &Timestamp{referenceTime},
+				CompletedAt: &Timestamp{referenceTime},
+			},
+		},
+		CheckRunURL: String("c"),
+	}
+
+	want := `{
+		"id": 1,
+		"run_id": 1,
+		"run_url": "r",
+		"node_id": "n",
+		"head_sha": "h",
+		"url": "u",
+		"html_url": "h",
+		"status": "s",
+		"conclusion": "c",
+		"started_at": ` + referenceTimeStr + `,
+		"completed_at": ` + referenceTimeStr + `,
+		"name": "n",
+		"steps": [{
+			"name": "n",
+			"status": "s",
+			"conclusion": "c",
+			"number": 1,
+			"started_at": ` + referenceTimeStr + `,
+			"completed_at": ` + referenceTimeStr + `
+		}],
+		"check_run_url": "c"
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestJobs_Marshal(t *testing.T) {
+	testJSONMarshal(t, &Jobs{}, "{}")
+
+	u := &Jobs{
+		TotalCount: Int(1),
+		Jobs: []*WorkflowJob{
+			{
+				ID:          Int64(1),
+				RunID:       Int64(1),
+				RunURL:      String("r"),
+				NodeID:      String("n"),
+				HeadSHA:     String("h"),
+				URL:         String("u"),
+				HTMLURL:     String("h"),
+				Status:      String("s"),
+				Conclusion:  String("c"),
+				StartedAt:   &Timestamp{referenceTime},
+				CompletedAt: &Timestamp{referenceTime},
+				Name:        String("n"),
+				Steps: []*TaskStep{
+					{
+						Name:        String("n"),
+						Status:      String("s"),
+						Conclusion:  String("c"),
+						Number:      Int64(1),
+						StartedAt:   &Timestamp{referenceTime},
+						CompletedAt: &Timestamp{referenceTime},
+					},
+				},
+				CheckRunURL: String("c"),
+			},
+		},
+	}
+
+	want := `{
+		"total_count": 1,
+		"jobs": [{
+			"id": 1,
+			"run_id": 1,
+			"run_url": "r",
+			"node_id": "n",
+			"head_sha": "h",
+			"url": "u",
+			"html_url": "h",
+			"status": "s",
+			"conclusion": "c",
+			"started_at": ` + referenceTimeStr + `,
+			"completed_at": ` + referenceTimeStr + `,
+			"name": "n",
+			"steps": [{
+				"name": "n",
+				"status": "s",
+				"conclusion": "c",
+				"number": 1,
+				"started_at": ` + referenceTimeStr + `,
+				"completed_at": ` + referenceTimeStr + `
+			}],
+			"check_run_url": "c"
+		}]
+	}`
+
+	testJSONMarshal(t, u, want)
+}
diff --git a/github/examples_test.go b/github/examples_test.go
index 33851fac..e3d6c24e 100644
--- a/github/examples_test.go
+++ b/github/examples_test.go
@@ -12,7 +12,7 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 func ExampleClient_Markdown() {
diff --git a/github/gen-stringify-test.go b/github/gen-stringify-test.go
index cc1d1536..0bd1f120 100644
--- a/github/gen-stringify-test.go
+++ b/github/gen-stringify-test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // gen-stringify-test generates test methods to test the String methods.
diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go
index 750c6a40..737a7ade 100644
--- a/github/github-accessors_test.go
+++ b/github/github-accessors_test.go
@@ -17471,6 +17471,16 @@ func TestTimeline_GetSource(tt *testing.T) {
 	t.GetSource()
 }
 
+func TestTimeline_GetState(tt *testing.T) {
+	var zeroValue string
+	t := &Timeline{State: &zeroValue}
+	t.GetState()
+	t = &Timeline{}
+	t.GetState()
+	t = nil
+	t.GetState()
+}
+
 func TestTimeline_GetURL(tt *testing.T) {
 	var zeroValue string
 	t := &Timeline{URL: &zeroValue}
diff --git a/test/fields/fields.go b/test/fields/fields.go
index 07cf9451..de606ab8 100644
--- a/test/fields/fields.go
+++ b/test/fields/fields.go
@@ -25,7 +25,7 @@ import (
 	"reflect"
 	"strings"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 )
 
diff --git a/test/integration/activity_test.go b/test/integration/activity_test.go
index 013ac5f0..0f8c64c3 100644
--- a/test/integration/activity_test.go
+++ b/test/integration/activity_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
@@ -11,7 +12,7 @@ import (
 	"context"
 	"testing"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 const (
diff --git a/test/integration/audit_log_test.go b/test/integration/audit_log_test.go
index 9ed96eda..7819f929 100644
--- a/test/integration/audit_log_test.go
+++ b/test/integration/audit_log_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
diff --git a/test/integration/authorizations_test.go b/test/integration/authorizations_test.go
index 5b832f33..d7f516ba 100644
--- a/test/integration/authorizations_test.go
+++ b/test/integration/authorizations_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
@@ -16,7 +17,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 const msgEnvMissing = "Skipping test because the required environment variable (%v) is not present."
diff --git a/test/integration/github_test.go b/test/integration/github_test.go
index 52db8ac6..405eff74 100644
--- a/test/integration/github_test.go
+++ b/test/integration/github_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
@@ -14,7 +15,7 @@ import (
 	"net/http"
 	"os"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 	"golang.org/x/oauth2"
 )
 
diff --git a/test/integration/issues_test.go b/test/integration/issues_test.go
index a5e48900..c151ae48 100644
--- a/test/integration/issues_test.go
+++ b/test/integration/issues_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
diff --git a/test/integration/misc_test.go b/test/integration/misc_test.go
index 1595cf07..60753ada 100644
--- a/test/integration/misc_test.go
+++ b/test/integration/misc_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
diff --git a/test/integration/pulls_test.go b/test/integration/pulls_test.go
index 4aadfbd7..c054f55d 100644
--- a/test/integration/pulls_test.go
+++ b/test/integration/pulls_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
diff --git a/test/integration/repos_test.go b/test/integration/repos_test.go
index 8173bb2f..bfc6657e 100644
--- a/test/integration/repos_test.go
+++ b/test/integration/repos_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
@@ -15,7 +16,7 @@ import (
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 func TestRepositories_CRUD(t *testing.T) {
diff --git a/test/integration/users_test.go b/test/integration/users_test.go
index 43186106..6ea451e5 100644
--- a/test/integration/users_test.go
+++ b/test/integration/users_test.go
@@ -3,6 +3,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build integration
 // +build integration
 
 package integration
@@ -13,7 +14,7 @@ import (
 	"math/rand"
 	"testing"
 
-	"github.com/google/go-github/v35/github"
+	"github.com/google/go-github/v36/github"
 )
 
 func TestUsers_Get(t *testing.T) {