Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use metadata to reconcile go-github with GitHub's OpenAPI descriptions #2919

Merged
merged 38 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3083413
update doc urls
WillAbides Sep 8, 2023
11baddf
use metadata.yaml to reconcile source with OpenAPI descriptions
WillAbides Sep 8, 2023
462108e
trigger
WillAbides Sep 8, 2023
67d827b
minor refactor
WillAbides Sep 8, 2023
73e2220
go fmt
WillAbides Sep 8, 2023
d6360bd
update tools module
WillAbides Sep 8, 2023
7f4b553
revert script dir
WillAbides Sep 8, 2023
4aa1c11
restore gen-accessors.go and gen-stringify-test.go
WillAbides Sep 8, 2023
a1ba628
restore .gitignore
WillAbides Sep 8, 2023
7b7df59
go 1.20
WillAbides Sep 8, 2023
fa02527
update tooling and undocumented methods
WillAbides Sep 9, 2023
d855286
leave existing doc links in place
WillAbides Sep 10, 2023
43c3216
restore github dir
WillAbides Sep 10, 2023
ae5fd84
update regex
WillAbides Sep 10, 2023
000231c
update-urls
WillAbides Sep 10, 2023
e21c51b
include enterprise-server version in doc links
WillAbides Sep 10, 2023
1bf8fd6
add copyright notice
WillAbides Sep 10, 2023
0137f71
use ast in update-urls
WillAbides Sep 15, 2023
0f657ae
use ast in getServiceMethodsFromFile
WillAbides Sep 15, 2023
dfb3c8c
go fmt
WillAbides Sep 15, 2023
9a85b69
Use enterprise-cloud links
WillAbides Sep 15, 2023
63190e9
Merge branch 'master' into meta11
WillAbides Oct 14, 2023
b0ad415
refactor
WillAbides Oct 14, 2023
fcd94b3
fix comment
WillAbides Oct 14, 2023
cf4795b
start on CONTRIBUTING.md
WillAbides Oct 15, 2023
8e8cef8
rename metadata sub-commands
WillAbides Oct 15, 2023
b9b5e6f
make canonize more flexible
WillAbides Oct 15, 2023
b2b2e71
use //meta:operation directives
WillAbides Oct 19, 2023
54443b7
Merge branch 'master' into meta4
WillAbides Oct 19, 2023
ffd73b6
revert accidental test changes
WillAbides Oct 19, 2023
a2bff7b
Apply suggestions from code review
WillAbides Oct 19, 2023
4183cf5
Apply suggestions from code review
WillAbides Oct 19, 2023
b6d3af6
return AtoI errors
WillAbides Oct 19, 2023
6e4d263
update CONTRIBUTING.md
WillAbides Oct 19, 2023
0204952
Merge branch 'master' into meta4
WillAbides Oct 23, 2023
66a2035
add meta for RateLimitService.Get
WillAbides Oct 23, 2023
d72f064
Merge branch 'master' into meta4
WillAbides Nov 3, 2023
4a065a9
fix .golangci.yml exclusion for tools
WillAbides Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ ignore:
- "github/github-accessors.go"
# ignore experimental scrape package
- "scrape"
# ignore update-urls
- "update-urls"
# ignore tools
- "tools"
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
schedule:
interval: weekly
- package-ecosystem: gomod
directory: update-urls
directory: tools
schedule:
interval: weekly
- package-ecosystem: github-actions
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ jobs:
go-version: 1.x
cache-dependency-path: "**/go.sum"
- run: script/lint.sh
env:
CHECK_GITHUB_OPENAPI: 1
GITHUB_TOKEN: ${{ github.token }}
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ are more sensitive, emailed to <[email protected]>.
[pull request]: https://help.github.com/articles/creating-a-pull-request
[monitored by codecov.io]: https://codecov.io/gh/google/go-github

## Metadata ##

`metadata.yaml` contains metadata about go-github's code and GitHub's OpenAPI
specification. We use this metadata to keep documentation links up to date and
to keep tabs on coverage of the GitHub API.

All exported methods on `*Service` structs need to have an entry in the
"methods" section of `metadata.yaml` that maps it to the corresponding
OpenAPI operation.

## Scripts ##

The `script` directory has shell scripts that help with common development
Expand Down
2 changes: 1 addition & 1 deletion github/actions_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (s *ActionsService) GetTotalCacheUsageForOrg(ctx context.Context, org strin
//
// Permissions: You must authenticate using an access token with the "admin:enterprise" scope to use this endpoint.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-an-enterprise
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/cache#get-github-actions-cache-usage-for-an-enterprise
func (s *ActionsService) GetTotalCacheUsageForEnterprise(ctx context.Context, enterprise string) (*TotalCacheUsage, *Response, error) {
u := fmt.Sprintf("enterprises/%v/actions/cache/usage", enterprise)
req, err := s.client.NewRequest("GET", u, nil)
Expand Down
20 changes: 10 additions & 10 deletions github/actions_required_workflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ type RepoRequiredWorkflows struct {

// ListOrgRequiredWorkflows lists the RequiredWorkflows for an org.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-required-workflows
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) ListOrgRequiredWorkflows(ctx context.Context, org string, opts *ListOptions) (*OrgRequiredWorkflows, *Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows", org)
u, err := addOptions(url, opts)
Expand All @@ -91,7 +91,7 @@ func (s *ActionsService) ListOrgRequiredWorkflows(ctx context.Context, org strin

// CreateRequiredWorkflow creates the required workflow in an org.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#create-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) CreateRequiredWorkflow(ctx context.Context, org string, createRequiredWorkflowOptions *CreateUpdateRequiredWorkflowOptions) (*OrgRequiredWorkflow, *Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows", org)
req, err := s.client.NewRequest("POST", url, createRequiredWorkflowOptions)
Expand All @@ -110,7 +110,7 @@ func (s *ActionsService) CreateRequiredWorkflow(ctx context.Context, org string,

// GetRequiredWorkflowByID get the RequiredWorkflows for an org by its ID.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-required-workflows
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) GetRequiredWorkflowByID(ctx context.Context, owner string, requiredWorkflowID int64) (*OrgRequiredWorkflow, *Response, error) {
u := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", owner, requiredWorkflowID)

Expand All @@ -130,7 +130,7 @@ func (s *ActionsService) GetRequiredWorkflowByID(ctx context.Context, owner stri

// UpdateRequiredWorkflow updates a required workflow in an org.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#update-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) UpdateRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID int64, updateRequiredWorkflowOptions *CreateUpdateRequiredWorkflowOptions) (*OrgRequiredWorkflow, *Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", org, requiredWorkflowID)
req, err := s.client.NewRequest("PATCH", url, updateRequiredWorkflowOptions)
Expand All @@ -149,7 +149,7 @@ func (s *ActionsService) UpdateRequiredWorkflow(ctx context.Context, org string,

// DeleteRequiredWorkflow deletes a required workflow in an org.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#update-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) DeleteRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID int64) (*Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", org, requiredWorkflowID)
req, err := s.client.NewRequest("DELETE", url, nil)
Expand All @@ -161,7 +161,7 @@ func (s *ActionsService) DeleteRequiredWorkflow(ctx context.Context, org string,

// ListRequiredWorkflowSelectedRepos lists the Repositories selected for a workflow.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-selected-repositories-for-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) ListRequiredWorkflowSelectedRepos(ctx context.Context, org string, requiredWorkflowID int64, opts *ListOptions) (*RequiredWorkflowSelectedRepos, *Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories", org, requiredWorkflowID)
u, err := addOptions(url, opts)
Expand All @@ -184,7 +184,7 @@ func (s *ActionsService) ListRequiredWorkflowSelectedRepos(ctx context.Context,

// SetRequiredWorkflowSelectedRepos sets the Repositories selected for a workflow.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#sets-repositories-for-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) SetRequiredWorkflowSelectedRepos(ctx context.Context, org string, requiredWorkflowID int64, ids SelectedRepoIDs) (*Response, error) {
type repoIDs struct {
SelectedIDs SelectedRepoIDs `json:"selected_repository_ids"`
Expand All @@ -200,7 +200,7 @@ func (s *ActionsService) SetRequiredWorkflowSelectedRepos(ctx context.Context, o

// AddRepoToRequiredWorkflow adds the Repository to a required workflow.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#add-a-repository-to-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) AddRepoToRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID, repoID int64) (*Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories/%v", org, requiredWorkflowID, repoID)
req, err := s.client.NewRequest("PUT", url, nil)
Expand All @@ -212,7 +212,7 @@ func (s *ActionsService) AddRepoToRequiredWorkflow(ctx context.Context, org stri

// RemoveRepoFromRequiredWorkflow removes the Repository from a required workflow.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#add-a-repository-to-a-required-workflow
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) RemoveRepoFromRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID, repoID int64) (*Response, error) {
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories/%v", org, requiredWorkflowID, repoID)
req, err := s.client.NewRequest("DELETE", url, nil)
Expand All @@ -224,7 +224,7 @@ func (s *ActionsService) RemoveRepoFromRequiredWorkflow(ctx context.Context, org

// ListRepoRequiredWorkflows lists the RequiredWorkflows for a repo.
//
// Github API docs:https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-repository-required-workflows
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
func (s *ActionsService) ListRepoRequiredWorkflows(ctx context.Context, owner, repo string, opts *ListOptions) (*RepoRequiredWorkflows, *Response, error) {
url := fmt.Sprintf("repos/%v/%v/actions/required_workflows", owner, repo)
u, err := addOptions(url, opts)
Expand Down
26 changes: 13 additions & 13 deletions github/actions_runner_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type ListOrgRunnerGroupOptions struct {

// ListOrganizationRunnerGroups lists all self-hosted runner groups configured in an organization.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization
func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *ListOrgRunnerGroupOptions) (*RunnerGroups, *Response, error) {
u := fmt.Sprintf("orgs/%v/actions/runner-groups", org)
u, err := addOptions(u, opts)
Expand All @@ -104,7 +104,7 @@ func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org s

// GetOrganizationRunnerGroup gets a specific self-hosted runner group for an organization using its RunnerGroup ID.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)
Expand All @@ -123,7 +123,7 @@ func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org str

// DeleteOrganizationRunnerGroup deletes a self-hosted runner group from an organization.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)

Expand All @@ -137,7 +137,7 @@ func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org

// CreateOrganizationRunnerGroup creates a new self-hosted runner group for an organization.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)
Expand All @@ -156,7 +156,7 @@ func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org

// UpdateOrganizationRunnerGroup updates a self-hosted runner group for an organization.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)
Expand All @@ -175,7 +175,7 @@ func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org

// 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/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, opts *ListOptions) (*ListRepositories, *Response, error) {
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories", org, groupID)
u, err := addOptions(u, opts)
Expand All @@ -200,7 +200,7 @@ func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, or
// 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/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)

Expand All @@ -215,7 +215,7 @@ func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org
// 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/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)

Expand All @@ -230,7 +230,7 @@ func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org
// 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/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#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)

Expand All @@ -244,7 +244,7 @@ func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context,

// ListRunnerGroupRunners lists self-hosted runners that are in a specific organization group.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization
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)
Expand All @@ -269,7 +269,7 @@ func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string,
// 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/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization
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)

Expand All @@ -283,7 +283,7 @@ func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string,

// AddRunnerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization
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)

Expand All @@ -298,7 +298,7 @@ func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string,
// 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/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization
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)

Expand Down
2 changes: 1 addition & 1 deletion github/actions_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (s *ActionsService) UpdateOrgVariable(ctx context.Context, org string, vari

// UpdateEnvVariable updates an environment variable.
//
// GitHub API docs: https://docs.github.com/en/rest/actions/variables#create-an-environment-variable
// GitHub API docs: https://docs.github.com/rest/actions/variables#update-an-environment-variable
func (s *ActionsService) UpdateEnvVariable(ctx context.Context, repoID int, env string, variable *ActionsVariable) (*Response, error) {
url := fmt.Sprintf("repositories/%v/environments/%v/variables/%v", repoID, env, variable.Name)
return s.patchVariable(ctx, url, variable)
Expand Down
Loading
Loading