Repository: google/go-github
Pull request #1804 (2021-02-17 13:56:14)

Support self-hosted runner groups
relates to issue #1594 

codecov[bot]: # [Codecov](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=h1) Report
> Merging [#1804](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=desc) (c6df0b6) into [master](https://codecov.io/gh/google/go-github/commit/dfc45d98d3e8531077738876df88127148a4bcc9?el=desc) (dfc45d9) will **increase** coverage by `0.03%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/google/go-github/pull/1804/graphs/tree.svg?width=650&height=150&src=pr&token=EgYjGjZlI0)](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1804      +/-   ##
==========================================
+ Coverage   97.55%   97.59%   +0.03%     
==========================================
  Files          99      100       +1     
  Lines        6426     6521      +95     
==========================================
+ Hits         6269     6364      +95     
  Misses         85       85              
  Partials       72       72              
```


| [Impacted Files](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [github/actions\_runner\_groups.go](https://codecov.io/gh/google/go-github/pull/1804/diff?src=pr&el=tree#diff-Z2l0aHViL2FjdGlvbnNfcnVubmVyX2dyb3Vwcy5nbw==) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=footer). Last update [dfc45d9...c6df0b6](https://codecov.io/gh/google/go-github/pull/1804?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/github/actions_runner_groups.go b/github/actions_runner_groups.go
new file mode 100644
index 00000000..2c0459d5
--- /dev/null
+++ b/github/actions_runner_groups.go
@@ -0,0 +1,286 @@
+// Copyright 2021 The go-github AUTHORS. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package github
+
+import (
+	"context"
+	"fmt"
+)
+
+// RunnerGroup represents a self-hosted runner group configured in an organization.
+type RunnerGroup struct {
+	ID                       *int64  `json:"id,omitempty"`
+	Name                     *string `json:"name,omitempty"`
+	Visibility               *string `json:"visibility,omitempty"`
+	Default                  *bool   `json:"default,omitempty"`
+	SelectedRepositoriesURL  *string `json:"selected_repositories_url,omitempty"`
+	RunnersURL               *string `json:"runners_url,omitempty"`
+	Inherited                *bool   `json:"inherited,omitempty"`
+	AllowsPublicRepositories *bool   `json:"allows_public_repositories,omitempty"`
+}
+
+// RunnerGroups represents a collection of self-hosted runner groups configured for an organization.
+type RunnerGroups struct {
+	TotalCount   int            `json:"total_count"`
+	RunnerGroups []*RunnerGroup `json:"runner_groups"`
+}
+
+// CreateRunnerGroupRequest represents a request to create a Runner group for an organization.
+type CreateRunnerGroupRequest struct {
+	Name       *string `json:"name,omitempty"`
+	Visibility *string `json:"visibility,omitempty"`
+	// List of repository IDs that can access the runner group.
+	SelectedRepositoryIDs []int64 `json:"selected_repository_ids,omitempty"`
+	// Runners represent a list of runner IDs to add to the runner group.
+	Runners []int64 `json:"runners,omitempty"`
+}
+
+// UpdateRunnerGroupRequest represents a request to update a Runner group for an organization.
+type UpdateRunnerGroupRequest struct {
+	Name       *string `json:"name,omitempty"`
+	Visibility *string `json:"visibility,omitempty"`
+}
+
+// SetRepoAccessRunnerGroupRequest represents a request to replace the list of repositories
+// that can access a self-hosted runner group configured in an organization.
+type SetRepoAccessRunnerGroupRequest struct {
+	// Updated list of repository IDs that should be given access to the runner group.
+	SelectedRepositoryIDs []int64 `json:"selected_repository_ids"`
+}
+
+// SetRunnerGroupRunnersRequest represents a request to replace the list of
+// self-hosted runners that are part of an organization runner group.
+type SetRunnerGroupRunnersRequest struct {
+	// Updated list of runner IDs that should be given access to the runner group.
+	Runners []int64 `json:"runners"`
+}
+
+// ListOrganizationRunnerGroups lists all self-hosted runner groups configured in an organization.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization
+func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *ListOptions) (*RunnerGroups, *Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups", org)
+	u, err := addOptions(u, opts)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	groups := &RunnerGroups{}
+	resp, err := s.client.Do(ctx, req, &groups)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return groups, resp, nil
+}
+
+// GetOrganizationRunnerGroup gets a specific self-hosted runner group for an organization using its RunnerGroup ID.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization
+func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*RunnerGroup, *Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v", org, groupID)
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	runnerGroup := new(RunnerGroup)
+	resp, err := s.client.Do(ctx, req, runnerGroup)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return runnerGroup, resp, nil
+}
+
+// DeleteOrganizationRunnerGroup deletes a self-hosted runner group from an organization.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization
+func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v", org, groupID)
+
+	req, err := s.client.NewRequest("DELETE", u, nil)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
+// CreateOrganizationRunnerGroup creates a new self-hosted runner group for an organization.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization
+func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org string, createReq CreateRunnerGroupRequest) (*RunnerGroup, *Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups", org)
+	req, err := s.client.NewRequest("POST", u, createReq)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	runnerGroup := new(RunnerGroup)
+	resp, err := s.client.Do(ctx, req, runnerGroup)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return runnerGroup, resp, nil
+}
+
+// UpdateOrganizationRunnerGroup updates a self-hosted runner group for an organization.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization
+func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org string, groupID int64, updateReq UpdateRunnerGroupRequest) (*RunnerGroup, *Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v", org, groupID)
+	req, err := s.client.NewRequest("PATCH", u, updateReq)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	runnerGroup := new(RunnerGroup)
+	resp, err := s.client.Do(ctx, req, runnerGroup)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return runnerGroup, resp, nil
+}
+
+// ListRepositoryAccessRunnerGroup lists the repositories with access to a self-hosted runner group configured in an organization.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
+func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64) (*ListRepositories, *Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories", org, groupID)
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	repos := &ListRepositories{}
+	resp, err := s.client.Do(ctx, req, &repos)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return repos, resp, nil
+}
+
+// SetRepositoryAccessRunnerGroup replaces the list of repositories that have access to a self-hosted runner group configured in an organization
+// with a new List of repositories.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#set-repository-access-for-a-self-hosted-runner-group-in-an-organization
+func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, ids SetRepoAccessRunnerGroupRequest) (*Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories", org, groupID)
+
+	req, err := s.client.NewRequest("PUT", u, ids)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
+// AddRepositoryAccessRunnerGroup adds a repository to the list of selected repositories that can access a self-hosted runner group.
+// The runner group must have visibility set to 'selected'.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#add-repository-access-to-a-self-hosted-runner-group-in-an-organization
+func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories/%v", org, groupID, repoID)
+
+	req, err := s.client.NewRequest("PUT", u, nil)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
+// RemoveRepositoryAccessRunnerGroup removes a repository from the list of selected repositories that can access a self-hosted runner group.
+// The runner group must have visibility set to 'selected'.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization
+func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories/%v", org, groupID, repoID)
+
+	req, err := s.client.NewRequest("DELETE", u, nil)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
+// ListRunerGroupRunners 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) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
+	u, err := addOptions(u, opts)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	runners := &Runners{}
+	resp, err := s.client.Do(ctx, req, &runners)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return runners, resp, nil
+}
+
+// SetRunerGroupRunners 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) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
+
+	req, err := s.client.NewRequest("PUT", u, ids)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
+// AddRunerGroupRunners 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) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)
+
+	req, err := s.client.NewRequest("PUT", u, nil)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
+// RemoveRunerGroupRunners 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) {
+	u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)
+
+	req, err := s.client.NewRequest("DELETE", u, nil)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
diff --git a/github/github-accessors.go b/github/github-accessors.go
index 5794c076..e6ea3431 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -2420,6 +2420,22 @@ func (c *CreateOrgInvitationOptions) GetRole() string {
 	return *c.Role
 }
 
+// GetName returns the Name field if it's non-nil, zero value otherwise.
+func (c *CreateRunnerGroupRequest) GetName() string {
+	if c == nil || c.Name == nil {
+		return ""
+	}
+	return *c.Name
+}
+
+// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.
+func (c *CreateRunnerGroupRequest) GetVisibility() string {
+	if c == nil || c.Visibility == nil {
+		return ""
+	}
+	return *c.Visibility
+}
+
 // GetBody returns the Body field if it's non-nil, zero value otherwise.
 func (c *CreateUserProjectOptions) GetBody() string {
 	if c == nil || c.Body == nil {
@@ -7220,6 +7236,22 @@ func (o *Organization) GetMembersCanCreateInternalRepos() bool {
 	return *o.MembersCanCreateInternalRepos
 }
 
+// GetMembersCanCreatePages returns the MembersCanCreatePages field if it's non-nil, zero value otherwise.
+func (o *Organization) GetMembersCanCreatePages() bool {
+	if o == nil || o.MembersCanCreatePages == nil {
+		return false
+	}
+	return *o.MembersCanCreatePages
+}
+
+// GetMembersCanCreatePrivatePages returns the MembersCanCreatePrivatePages field if it's non-nil, zero value otherwise.
+func (o *Organization) GetMembersCanCreatePrivatePages() bool {
+	if o == nil || o.MembersCanCreatePrivatePages == nil {
+		return false
+	}
+	return *o.MembersCanCreatePrivatePages
+}
+
 // GetMembersCanCreatePrivateRepos returns the MembersCanCreatePrivateRepos field if it's non-nil, zero value otherwise.
 func (o *Organization) GetMembersCanCreatePrivateRepos() bool {
 	if o == nil || o.MembersCanCreatePrivateRepos == nil {
@@ -7228,6 +7260,14 @@ func (o *Organization) GetMembersCanCreatePrivateRepos() bool {
 	return *o.MembersCanCreatePrivateRepos
 }
 
+// GetMembersCanCreatePublicPages returns the MembersCanCreatePublicPages field if it's non-nil, zero value otherwise.
+func (o *Organization) GetMembersCanCreatePublicPages() bool {
+	if o == nil || o.MembersCanCreatePublicPages == nil {
+		return false
+	}
+	return *o.MembersCanCreatePublicPages
+}
+
 // GetMembersCanCreatePublicRepos returns the MembersCanCreatePublicRepos field if it's non-nil, zero value otherwise.
 func (o *Organization) GetMembersCanCreatePublicRepos() bool {
 	if o == nil || o.MembersCanCreatePublicRepos == nil {
@@ -12724,6 +12764,70 @@ func (r *RunnerApplicationDownload) GetOS() string {
 	return *r.OS
 }
 
+// GetAllowsPublicRepositories returns the AllowsPublicRepositories field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetAllowsPublicRepositories() bool {
+	if r == nil || r.AllowsPublicRepositories == nil {
+		return false
+	}
+	return *r.AllowsPublicRepositories
+}
+
+// GetDefault returns the Default field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetDefault() bool {
+	if r == nil || r.Default == nil {
+		return false
+	}
+	return *r.Default
+}
+
+// GetID returns the ID field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetID() int64 {
+	if r == nil || r.ID == nil {
+		return 0
+	}
+	return *r.ID
+}
+
+// GetInherited returns the Inherited field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetInherited() bool {
+	if r == nil || r.Inherited == nil {
+		return false
+	}
+	return *r.Inherited
+}
+
+// GetName returns the Name field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetName() string {
+	if r == nil || r.Name == nil {
+		return ""
+	}
+	return *r.Name
+}
+
+// GetRunnersURL returns the RunnersURL field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetRunnersURL() string {
+	if r == nil || r.RunnersURL == nil {
+		return ""
+	}
+	return *r.RunnersURL
+}
+
+// GetSelectedRepositoriesURL returns the SelectedRepositoriesURL field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetSelectedRepositoriesURL() string {
+	if r == nil || r.SelectedRepositoriesURL == nil {
+		return ""
+	}
+	return *r.SelectedRepositoriesURL
+}
+
+// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.
+func (r *RunnerGroup) GetVisibility() string {
+	if r == nil || r.Visibility == nil {
+		return ""
+	}
+	return *r.Visibility
+}
+
 // GetID returns the ID field if it's non-nil, zero value otherwise.
 func (r *RunnerLabels) GetID() int64 {
 	if r == nil || r.ID == nil {
@@ -14172,6 +14276,22 @@ func (u *UpdateCheckRunOptions) GetStatus() string {
 	return *u.Status
 }
 
+// GetName returns the Name field if it's non-nil, zero value otherwise.
+func (u *UpdateRunnerGroupRequest) GetName() string {
+	if u == nil || u.Name == nil {
+		return ""
+	}
+	return *u.Name
+}
+
+// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.
+func (u *UpdateRunnerGroupRequest) GetVisibility() string {
+	if u == nil || u.Visibility == nil {
+		return ""
+	}
+	return *u.Visibility
+}
+
 // GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise.
 func (u *User) GetAvatarURL() string {
 	if u == nil || u.AvatarURL == nil {
diff --git a/github/orgs.go b/github/orgs.go
index beb71fff..62f6ed24 100644
--- a/github/orgs.go
+++ b/github/orgs.go
@@ -73,6 +73,13 @@ type Organization struct {
 	// operation and does not consider 'internal' repositories during 'get' operation
 	MembersAllowedRepositoryCreationType *string `json:"members_allowed_repository_creation_type,omitempty"`
 
+	// MembersCanCreatePages toggles whether organization members can create GitHub Pages sites.
+	MembersCanCreatePages *bool `json:"members_can_create_pages,omitempty"`
+	// MembersCanCreatePublicPages toggles whether organization members can create public GitHub Pages sites.
+	MembersCanCreatePublicPages *bool `json:"members_can_create_public_pages,omitempty"`
+	// MembersCanCreatePrivatePages toggles whether organization members can create private GitHub Pages sites.
+	MembersCanCreatePrivatePages *bool `json:"members_can_create_private_pages,omitempty"`
+
 	// API URLs
 	URL              *string `json:"url,omitempty"`
 	EventsURL        *string `json:"events_url,omitempty"`


Test patch:
diff --git a/github/actions_runner_groups_test.go b/github/actions_runner_groups_test.go
new file mode 100644
index 00000000..30a76655
--- /dev/null
+++ b/github/actions_runner_groups_test.go
@@ -0,0 +1,473 @@
+// Copyright 2021 The go-github AUTHORS. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package github
+
+import (
+	"context"
+	"fmt"
+	"net/http"
+	"reflect"
+	"testing"
+)
+
+func TestActionsService_ListOrganizationRunnerGroups(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		testFormValues(t, r, values{"per_page": "2", "page": "2"})
+		fmt.Fprint(w, `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners","inherited":false,"allows_public_repositories":true},{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":true,"allows_public_repositories":true},{"id":3,"name":"expensive-hardware","visibility":"private","default":false,"runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true}]}`)
+	})
+
+	opts := &ListOptions{Page: 2, PerPage: 2}
+	ctx := context.Background()
+	groups, _, err := client.Actions.ListOrganizationRunnerGroups(ctx, "o", opts)
+	if err != nil {
+		t.Errorf("Actions.ListOrganizationRunnerGroups returned error: %v", err)
+	}
+
+	want := &RunnerGroups{
+		TotalCount: 3,
+		RunnerGroups: []*RunnerGroup{
+			{ID: Int64(1), Name: String("Default"), Visibility: String("all"), Default: Bool(true), RunnersURL: String("https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners"), Inherited: Bool(false), AllowsPublicRepositories: Bool(true)},
+			{ID: Int64(2), Name: String("octo-runner-group"), Visibility: String("selected"), Default: Bool(false), SelectedRepositoriesURL: String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories"), RunnersURL: String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners"), Inherited: Bool(true), AllowsPublicRepositories: Bool(true)},
+			{ID: Int64(3), Name: String("expensive-hardware"), Visibility: String("private"), Default: Bool(false), RunnersURL: String("https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners"), Inherited: Bool(false), AllowsPublicRepositories: Bool(true)},
+		},
+	}
+	if !reflect.DeepEqual(groups, want) {
+		t.Errorf("Actions.ListOrganizationRunnerGroups returned %+v, want %+v", groups, want)
+	}
+
+	const methodName = "ListOrganizationRunnerGroups"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Actions.ListOrganizationRunnerGroups(ctx, "\n", opts)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Actions.ListOrganizationRunnerGroups(ctx, "o", opts)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestActionsService_GetOrganizationRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true}`)
+	})
+
+	ctx := context.Background()
+	group, _, err := client.Actions.GetOrganizationRunnerGroup(ctx, "o", 2)
+	if err != nil {
+		t.Errorf("Actions.ListOrganizationRunnerGroups returned error: %v", err)
+	}
+
+	want := &RunnerGroup{
+		ID:                       Int64(2),
+		Name:                     String("octo-runner-group"),
+		Visibility:               String("selected"),
+		Default:                  Bool(false),
+		SelectedRepositoriesURL:  String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories"),
+		RunnersURL:               String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners"),
+		Inherited:                Bool(false),
+		AllowsPublicRepositories: Bool(true),
+	}
+
+	if !reflect.DeepEqual(group, want) {
+		t.Errorf("Actions.GetOrganizationRunnerGroup returned %+v, want %+v", group, want)
+	}
+
+	const methodName = "GetOrganizationRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Actions.GetOrganizationRunnerGroup(ctx, "\n", 2)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Actions.GetOrganizationRunnerGroup(ctx, "o", 2)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestActionsService_DeleteOrganizationRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "DELETE")
+	})
+
+	ctx := context.Background()
+	_, err := client.Actions.DeleteOrganizationRunnerGroup(ctx, "o", 2)
+	if err != nil {
+		t.Errorf("Actions.DeleteOrganizationRunnerGroup returned error: %v", err)
+	}
+
+	const methodName = "DeleteOrganizationRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.DeleteOrganizationRunnerGroup(ctx, "\n", 2)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.DeleteOrganizationRunnerGroup(ctx, "o", 2)
+	})
+}
+
+func TestActionsService_CreateOrganizationRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "POST")
+		fmt.Fprint(w, `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true}`)
+	})
+
+	ctx := context.Background()
+	req := CreateRunnerGroupRequest{
+		Name:       String("octo-runner-group"),
+		Visibility: String("selected"),
+	}
+	group, _, err := client.Actions.CreateOrganizationRunnerGroup(ctx, "o", req)
+	if err != nil {
+		t.Errorf("Actions.CreateOrganizationRunnerGroup returned error: %v", err)
+	}
+
+	want := &RunnerGroup{
+		ID:                       Int64(2),
+		Name:                     String("octo-runner-group"),
+		Visibility:               String("selected"),
+		Default:                  Bool(false),
+		SelectedRepositoriesURL:  String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories"),
+		RunnersURL:               String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners"),
+		Inherited:                Bool(false),
+		AllowsPublicRepositories: Bool(true),
+	}
+
+	if !reflect.DeepEqual(group, want) {
+		t.Errorf("Actions.CreateOrganizationRunnerGroup returned %+v, want %+v", group, want)
+	}
+
+	const methodName = "CreateOrganizationRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Actions.CreateOrganizationRunnerGroup(ctx, "\n", req)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Actions.CreateOrganizationRunnerGroup(ctx, "o", req)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestActionsService_UpdateOrganizationRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "PATCH")
+		fmt.Fprint(w, `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true}`)
+	})
+
+	ctx := context.Background()
+	req := UpdateRunnerGroupRequest{
+		Name:       String("octo-runner-group"),
+		Visibility: String("selected"),
+	}
+	group, _, err := client.Actions.UpdateOrganizationRunnerGroup(ctx, "o", 2, req)
+	if err != nil {
+		t.Errorf("Actions.UpdateOrganizationRunnerGroup returned error: %v", err)
+	}
+
+	want := &RunnerGroup{
+		ID:                       Int64(2),
+		Name:                     String("octo-runner-group"),
+		Visibility:               String("selected"),
+		Default:                  Bool(false),
+		SelectedRepositoriesURL:  String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories"),
+		RunnersURL:               String("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners"),
+		Inherited:                Bool(false),
+		AllowsPublicRepositories: Bool(true),
+	}
+
+	if !reflect.DeepEqual(group, want) {
+		t.Errorf("Actions.UpdateOrganizationRunnerGroup returned %+v, want %+v", group, want)
+	}
+
+	const methodName = "UpdateOrganizationRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Actions.UpdateOrganizationRunnerGroup(ctx, "\n", 2, req)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Actions.UpdateOrganizationRunnerGroup(ctx, "o", 2, req)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestActionsService_ListRepositoryAccessRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/repositories", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `{"total_count": 1, "repositories": [{"id": 43, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "full_name": "octocat/Hello-World"}]}`)
+	})
+
+	ctx := context.Background()
+	groups, _, err := client.Actions.ListRepositoryAccessRunnerGroup(ctx, "o", 2)
+	if err != nil {
+		t.Errorf("Actions.ListRepositoryAccessRunnerGroup returned error: %v", err)
+	}
+
+	want := &ListRepositories{
+		TotalCount: Int(1),
+		Repositories: []*Repository{
+			{ID: Int64(43), NodeID: String("MDEwOlJlcG9zaXRvcnkxMjk2MjY5"), Name: String("Hello-World"), FullName: String("octocat/Hello-World")},
+		},
+	}
+	if !reflect.DeepEqual(groups, want) {
+		t.Errorf("Actions.ListRepositoryAccessRunnerGroup returned %+v, want %+v", groups, want)
+	}
+
+	const methodName = "ListRepositoryAccessRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Actions.ListRepositoryAccessRunnerGroup(ctx, "\n", 2)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Actions.ListRepositoryAccessRunnerGroup(ctx, "o", 2)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestActionsService_SetRepositoryAccessRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/repositories", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "PUT")
+	})
+
+	req := SetRepoAccessRunnerGroupRequest{
+		SelectedRepositoryIDs: []int64{
+			1,
+			2,
+		},
+	}
+
+	ctx := context.Background()
+	_, err := client.Actions.SetRepositoryAccessRunnerGroup(ctx, "o", 2, req)
+	if err != nil {
+		t.Errorf("Actions.SetRepositoryAccessRunnerGroup returned error: %v", err)
+	}
+
+	const methodName = "SetRepositoryAccessRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.SetRepositoryAccessRunnerGroup(ctx, "\n", 2, req)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.SetRepositoryAccessRunnerGroup(ctx, "o", 2, req)
+	})
+}
+
+func TestActionsService_AddRepositoryAccessRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/repositories/42", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "PUT")
+	})
+
+	ctx := context.Background()
+	_, err := client.Actions.AddRepositoryAccessRunnerGroup(ctx, "o", 2, 42)
+	if err != nil {
+		t.Errorf("Actions.AddRepositoryAccessRunnerGroup returned error: %v", err)
+	}
+
+	const methodName = "AddRepositoryAccessRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.AddRepositoryAccessRunnerGroup(ctx, "\n", 2, 42)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.AddRepositoryAccessRunnerGroup(ctx, "o", 2, 42)
+	})
+}
+
+func TestActionsService_RemoveRepositoryAccessRunnerGroup(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/repositories/42", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "DELETE")
+	})
+
+	ctx := context.Background()
+	_, err := client.Actions.RemoveRepositoryAccessRunnerGroup(ctx, "o", 2, 42)
+	if err != nil {
+		t.Errorf("Actions.RemoveRepositoryAccessRunnerGroup returned error: %v", err)
+	}
+
+	const methodName = "RemoveRepositoryAccessRunnerGroup"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.RemoveRepositoryAccessRunnerGroup(ctx, "\n", 2, 42)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.RemoveRepositoryAccessRunnerGroup(ctx, "o", 2, 42)
+	})
+}
+
+func TestActionsService_ListRunerGroupRunners(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/runners", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		testFormValues(t, r, values{"per_page": "2", "page": "2"})
+		fmt.Fprint(w, `{"total_count":2,"runners":[{"id":23,"name":"MBP","os":"macos","status":"online"},{"id":24,"name":"iMac","os":"macos","status":"offline"}]}`)
+	})
+
+	opts := &ListOptions{Page: 2, PerPage: 2}
+	ctx := context.Background()
+	runners, _, err := client.Actions.ListRunerGroupRunners(ctx, "o", 2, opts)
+	if err != nil {
+		t.Errorf("Actions.ListRunerGroupRunners returned error: %v", err)
+	}
+
+	want := &Runners{
+		TotalCount: 2,
+		Runners: []*Runner{
+			{ID: Int64(23), Name: String("MBP"), OS: String("macos"), Status: String("online")},
+			{ID: Int64(24), Name: String("iMac"), OS: String("macos"), Status: String("offline")},
+		},
+	}
+	if !reflect.DeepEqual(runners, want) {
+		t.Errorf("Actions.ListRunerGroupRunners returned %+v, want %+v", runners, want)
+	}
+
+	const methodName = "ListRunerGroupRunners"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Actions.ListRunerGroupRunners(ctx, "\n", 2, opts)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Actions.ListRunerGroupRunners(ctx, "o", 2, opts)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestActionsService_SetRunerGroupRunners(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/runners", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "PUT")
+	})
+
+	req := SetRunnerGroupRunnersRequest{
+		Runners: []int64{
+			1,
+			2,
+		},
+	}
+
+	ctx := context.Background()
+	_, err := client.Actions.SetRunerGroupRunners(ctx, "o", 2, req)
+	if err != nil {
+		t.Errorf("Actions.SetRunerGroupRunners returned error: %v", err)
+	}
+
+	const methodName = "SetRunerGroupRunners"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.SetRunerGroupRunners(ctx, "\n", 2, req)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.SetRunerGroupRunners(ctx, "o", 2, req)
+	})
+}
+
+func TestActionsService_AddRunerGroupRunners(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/runners/42", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "PUT")
+	})
+
+	ctx := context.Background()
+	_, err := client.Actions.AddRunerGroupRunners(ctx, "o", 2, 42)
+	if err != nil {
+		t.Errorf("Actions.AddRunerGroupRunners returned error: %v", err)
+	}
+
+	const methodName = "AddRunerGroupRunners"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.AddRunerGroupRunners(ctx, "\n", 2, 42)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.AddRunerGroupRunners(ctx, "o", 2, 42)
+	})
+}
+
+func TestActionsService_RemoveRunerGroupRunners(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/orgs/o/actions/runner-groups/2/runners/42", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "DELETE")
+	})
+
+	ctx := context.Background()
+	_, err := client.Actions.RemoveRunerGroupRunners(ctx, "o", 2, 42)
+	if err != nil {
+		t.Errorf("Actions.RemoveRunerGroupRunners returned error: %v", err)
+	}
+
+	const methodName = "RemoveRunerGroupRunners"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Actions.RemoveRunerGroupRunners(ctx, "\n", 2, 42)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Actions.RemoveRunerGroupRunners(ctx, "o", 2, 42)
+	})
+}
diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go
index f06fa5cc..5090e52e 100644
--- a/github/github-accessors_test.go
+++ b/github/github-accessors_test.go
@@ -2804,6 +2804,26 @@ func TestCreateOrgInvitationOptions_GetRole(tt *testing.T) {
 	c.GetRole()
 }
 
+func TestCreateRunnerGroupRequest_GetName(tt *testing.T) {
+	var zeroValue string
+	c := &CreateRunnerGroupRequest{Name: &zeroValue}
+	c.GetName()
+	c = &CreateRunnerGroupRequest{}
+	c.GetName()
+	c = nil
+	c.GetName()
+}
+
+func TestCreateRunnerGroupRequest_GetVisibility(tt *testing.T) {
+	var zeroValue string
+	c := &CreateRunnerGroupRequest{Visibility: &zeroValue}
+	c.GetVisibility()
+	c = &CreateRunnerGroupRequest{}
+	c.GetVisibility()
+	c = nil
+	c.GetVisibility()
+}
+
 func TestCreateUserProjectOptions_GetBody(tt *testing.T) {
 	var zeroValue string
 	c := &CreateUserProjectOptions{Body: &zeroValue}
@@ -8462,6 +8482,26 @@ func TestOrganization_GetMembersCanCreateInternalRepos(tt *testing.T) {
 	o.GetMembersCanCreateInternalRepos()
 }
 
+func TestOrganization_GetMembersCanCreatePages(tt *testing.T) {
+	var zeroValue bool
+	o := &Organization{MembersCanCreatePages: &zeroValue}
+	o.GetMembersCanCreatePages()
+	o = &Organization{}
+	o.GetMembersCanCreatePages()
+	o = nil
+	o.GetMembersCanCreatePages()
+}
+
+func TestOrganization_GetMembersCanCreatePrivatePages(tt *testing.T) {
+	var zeroValue bool
+	o := &Organization{MembersCanCreatePrivatePages: &zeroValue}
+	o.GetMembersCanCreatePrivatePages()
+	o = &Organization{}
+	o.GetMembersCanCreatePrivatePages()
+	o = nil
+	o.GetMembersCanCreatePrivatePages()
+}
+
 func TestOrganization_GetMembersCanCreatePrivateRepos(tt *testing.T) {
 	var zeroValue bool
 	o := &Organization{MembersCanCreatePrivateRepos: &zeroValue}
@@ -8472,6 +8512,16 @@ func TestOrganization_GetMembersCanCreatePrivateRepos(tt *testing.T) {
 	o.GetMembersCanCreatePrivateRepos()
 }
 
+func TestOrganization_GetMembersCanCreatePublicPages(tt *testing.T) {
+	var zeroValue bool
+	o := &Organization{MembersCanCreatePublicPages: &zeroValue}
+	o.GetMembersCanCreatePublicPages()
+	o = &Organization{}
+	o.GetMembersCanCreatePublicPages()
+	o = nil
+	o.GetMembersCanCreatePublicPages()
+}
+
 func TestOrganization_GetMembersCanCreatePublicRepos(tt *testing.T) {
 	var zeroValue bool
 	o := &Organization{MembersCanCreatePublicRepos: &zeroValue}
@@ -14871,6 +14921,86 @@ func TestRunnerApplicationDownload_GetOS(tt *testing.T) {
 	r.GetOS()
 }
 
+func TestRunnerGroup_GetAllowsPublicRepositories(tt *testing.T) {
+	var zeroValue bool
+	r := &RunnerGroup{AllowsPublicRepositories: &zeroValue}
+	r.GetAllowsPublicRepositories()
+	r = &RunnerGroup{}
+	r.GetAllowsPublicRepositories()
+	r = nil
+	r.GetAllowsPublicRepositories()
+}
+
+func TestRunnerGroup_GetDefault(tt *testing.T) {
+	var zeroValue bool
+	r := &RunnerGroup{Default: &zeroValue}
+	r.GetDefault()
+	r = &RunnerGroup{}
+	r.GetDefault()
+	r = nil
+	r.GetDefault()
+}
+
+func TestRunnerGroup_GetID(tt *testing.T) {
+	var zeroValue int64
+	r := &RunnerGroup{ID: &zeroValue}
+	r.GetID()
+	r = &RunnerGroup{}
+	r.GetID()
+	r = nil
+	r.GetID()
+}
+
+func TestRunnerGroup_GetInherited(tt *testing.T) {
+	var zeroValue bool
+	r := &RunnerGroup{Inherited: &zeroValue}
+	r.GetInherited()
+	r = &RunnerGroup{}
+	r.GetInherited()
+	r = nil
+	r.GetInherited()
+}
+
+func TestRunnerGroup_GetName(tt *testing.T) {
+	var zeroValue string
+	r := &RunnerGroup{Name: &zeroValue}
+	r.GetName()
+	r = &RunnerGroup{}
+	r.GetName()
+	r = nil
+	r.GetName()
+}
+
+func TestRunnerGroup_GetRunnersURL(tt *testing.T) {
+	var zeroValue string
+	r := &RunnerGroup{RunnersURL: &zeroValue}
+	r.GetRunnersURL()
+	r = &RunnerGroup{}
+	r.GetRunnersURL()
+	r = nil
+	r.GetRunnersURL()
+}
+
+func TestRunnerGroup_GetSelectedRepositoriesURL(tt *testing.T) {
+	var zeroValue string
+	r := &RunnerGroup{SelectedRepositoriesURL: &zeroValue}
+	r.GetSelectedRepositoriesURL()
+	r = &RunnerGroup{}
+	r.GetSelectedRepositoriesURL()
+	r = nil
+	r.GetSelectedRepositoriesURL()
+}
+
+func TestRunnerGroup_GetVisibility(tt *testing.T) {
+	var zeroValue string
+	r := &RunnerGroup{Visibility: &zeroValue}
+	r.GetVisibility()
+	r = &RunnerGroup{}
+	r.GetVisibility()
+	r = nil
+	r.GetVisibility()
+}
+
 func TestRunnerLabels_GetID(tt *testing.T) {
 	var zeroValue int64
 	r := &RunnerLabels{ID: &zeroValue}
@@ -16576,6 +16706,26 @@ func TestUpdateCheckRunOptions_GetStatus(tt *testing.T) {
 	u.GetStatus()
 }
 
+func TestUpdateRunnerGroupRequest_GetName(tt *testing.T) {
+	var zeroValue string
+	u := &UpdateRunnerGroupRequest{Name: &zeroValue}
+	u.GetName()
+	u = &UpdateRunnerGroupRequest{}
+	u.GetName()
+	u = nil
+	u.GetName()
+}
+
+func TestUpdateRunnerGroupRequest_GetVisibility(tt *testing.T) {
+	var zeroValue string
+	u := &UpdateRunnerGroupRequest{Visibility: &zeroValue}
+	u.GetVisibility()
+	u = &UpdateRunnerGroupRequest{}
+	u.GetVisibility()
+	u = nil
+	u.GetVisibility()
+}
+
 func TestUser_GetAvatarURL(tt *testing.T) {
 	var zeroValue string
 	u := &User{AvatarURL: &zeroValue}
diff --git a/github/github-stringify_test.go b/github/github-stringify_test.go
index ced52849..d77747d8 100644
--- a/github/github-stringify_test.go
+++ b/github/github-stringify_test.go
@@ -890,6 +890,9 @@ func TestOrganization_String(t *testing.T) {
 		MembersCanCreatePrivateRepos:         Bool(false),
 		MembersCanCreateInternalRepos:        Bool(false),
 		MembersAllowedRepositoryCreationType: String(""),
+		MembersCanCreatePages:                Bool(false),
+		MembersCanCreatePublicPages:          Bool(false),
+		MembersCanCreatePrivatePages:         Bool(false),
 		URL:                                  String(""),
 		EventsURL:                            String(""),
 		HooksURL:                             String(""),
@@ -898,7 +901,7 @@ func TestOrganization_String(t *testing.T) {
 		PublicMembersURL:                     String(""),
 		ReposURL:                             String(""),
 	}
-	want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersAllowedRepositoryCreationType:"", URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}`
+	want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Organization.String = %v, want %v", got, want)
 	}
diff --git a/github/orgs_test.go b/github/orgs_test.go
index dc467877..18a017d7 100644
--- a/github/orgs_test.go
+++ b/github/orgs_test.go
@@ -35,6 +35,9 @@ func TestOrganization_marshal(t *testing.T) {
 		MembersCanCreatePrivateRepos:         Bool(true),
 		MembersCanCreatePublicRepos:          Bool(false),
 		MembersAllowedRepositoryCreationType: String("all"),
+		MembersCanCreatePages:                Bool(true),
+		MembersCanCreatePublicPages:          Bool(false),
+		MembersCanCreatePrivatePages:         Bool(true),
 	}
 	want := `
 		{
@@ -54,7 +57,10 @@ func TestOrganization_marshal(t *testing.T) {
 			"members_can_create_public_repositories": false,
 			"members_can_create_private_repositories": true,
 			"members_can_create_internal_repositories": true,
-			"members_allowed_repository_creation_type": "all"
+			"members_allowed_repository_creation_type": "all",
+			"members_can_create_pages": true,
+			"members_can_create_public_pages": false,
+			"members_can_create_private_pages": true
 		}
 	`
 	testJSONMarshal(t, o, want)