Skip to content

Commit 7a7a7f0

Browse files
authored
Update URLs (#2373)
Fixes: #2360.
1 parent 6931fad commit 7a7a7f0

File tree

128 files changed

+13804
-13654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+13804
-13654
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ where to put new methods.
8787

8888
Code is organized in files also based pretty closely on the GitHub API
8989
documentation, following the format `{service}_{api}.go`. For example, methods
90-
defined at <https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#webhooks> live in
90+
defined at <https://docs.github.com/en/rest/webhooks/repos> live in
9191
[repos_hooks.go][].
9292

93-
[GitHub API documentation]: https://docs.github.com/en/free-pro-team@latest/rest/reference/
93+
[GitHub API documentation]: https://docs.github.com/en/rest
9494
[repos_hooks.go]: https://github.com/google/go-github/blob/master/github/repos_hooks.go
9595

9696

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ repos, _, err := client.Repositories.ListByOrg(context.Background(), "github", o
7272

7373
The services of a client divide the API into logical chunks and correspond to
7474
the structure of the GitHub API documentation at
75-
https://docs.github.com/en/free-pro-team@latest/rest/reference/.
75+
https://docs.github.com/en/rest .
7676

7777
NOTE: Using the [context](https://godoc.org/context) package, one can easily
7878
pass cancelation signals and deadlines to various services of the client for
@@ -168,7 +168,7 @@ if _, ok := err.(*github.RateLimitError); ok {
168168
```
169169

170170
Learn more about GitHub rate limiting at
171-
https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit.
171+
https://docs.github.com/en/rest/rate-limit .
172172

173173
### Accepted Status ###
174174

@@ -196,7 +196,7 @@ instead designed to work with a caching `http.Transport`. We recommend using
196196
https://github.com/gregjones/httpcache for that.
197197

198198
Learn more about GitHub conditional requests at
199-
https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#conditional-requests.
199+
https://docs.github.com/en/rest/overview/resources-in-the-rest-api#conditional-requests.
200200

201201
### Creating and Updating Resources ###
202202

github/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ package github
88
// ActionsService handles communication with the actions related
99
// methods of the GitHub API.
1010
//
11-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/
11+
// GitHub API docs: https://docs.github.com/en/rest/actions/
1212
type ActionsService service

github/actions_artifacts.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
// data between jobs in a workflow and provide storage for data
1717
// once a workflow is complete.
1818
//
19-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#artifacts
19+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts
2020
type Artifact struct {
2121
ID *int64 `json:"id,omitempty"`
2222
NodeID *string `json:"node_id,omitempty"`
@@ -30,15 +30,15 @@ type Artifact struct {
3030

3131
// ArtifactList represents a list of GitHub artifacts.
3232
//
33-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#artifacts
33+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts#artifacts
3434
type ArtifactList struct {
3535
TotalCount *int64 `json:"total_count,omitempty"`
3636
Artifacts []*Artifact `json:"artifacts,omitempty"`
3737
}
3838

3939
// ListArtifacts lists all artifacts that belong to a repository.
4040
//
41-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-artifacts-for-a-repository
41+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts#list-artifacts-for-a-repository
4242
func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string, opts *ListOptions) (*ArtifactList, *Response, error) {
4343
u := fmt.Sprintf("repos/%v/%v/actions/artifacts", owner, repo)
4444
u, err := addOptions(u, opts)
@@ -62,7 +62,7 @@ func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string,
6262

6363
// ListWorkflowRunArtifacts lists all artifacts that belong to a workflow run.
6464
//
65-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-workflow-run-artifacts
65+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts#list-workflow-run-artifacts
6666
func (s *ActionsService) ListWorkflowRunArtifacts(ctx context.Context, owner, repo string, runID int64, opts *ListOptions) (*ArtifactList, *Response, error) {
6767
u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/artifacts", owner, repo, runID)
6868
u, err := addOptions(u, opts)
@@ -86,7 +86,7 @@ func (s *ActionsService) ListWorkflowRunArtifacts(ctx context.Context, owner, re
8686

8787
// GetArtifact gets a specific artifact for a workflow run.
8888
//
89-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#get-an-artifact
89+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts#get-an-artifact
9090
func (s *ActionsService) GetArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Artifact, *Response, error) {
9191
u := fmt.Sprintf("repos/%v/%v/actions/artifacts/%v", owner, repo, artifactID)
9292

@@ -106,7 +106,7 @@ func (s *ActionsService) GetArtifact(ctx context.Context, owner, repo string, ar
106106

107107
// DownloadArtifact gets a redirect URL to download an archive for a repository.
108108
//
109-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#download-an-artifact
109+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts#download-an-artifact
110110
func (s *ActionsService) DownloadArtifact(ctx context.Context, owner, repo string, artifactID int64, followRedirects bool) (*url.URL, *Response, error) {
111111
u := fmt.Sprintf("repos/%v/%v/actions/artifacts/%v/zip", owner, repo, artifactID)
112112

@@ -126,7 +126,7 @@ func (s *ActionsService) DownloadArtifact(ctx context.Context, owner, repo strin
126126

127127
// DeleteArtifact deletes a workflow run artifact.
128128
//
129-
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#delete-an-artifact
129+
// GitHub API docs: https://docs.github.com/en/rest/actions/artifacts#delete-an-artifact
130130
func (s *ActionsService) DeleteArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Response, error) {
131131
u := fmt.Sprintf("repos/%v/%v/actions/artifacts/%v", owner, repo, artifactID)
132132

github/actions_runner_groups.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type ListOrgRunnerGroupOptions struct {
7171

7272
// ListOrganizationRunnerGroups lists all self-hosted runner groups configured in an organization.
7373
//
74-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization
74+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization
7575
func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *ListOrgRunnerGroupOptions) (*RunnerGroups, *Response, error) {
7676
u := fmt.Sprintf("orgs/%v/actions/runner-groups", org)
7777
u, err := addOptions(u, opts)
@@ -95,7 +95,7 @@ func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org s
9595

9696
// GetOrganizationRunnerGroup gets a specific self-hosted runner group for an organization using its RunnerGroup ID.
9797
//
98-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization
98+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization
9999
func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*RunnerGroup, *Response, error) {
100100
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v", org, groupID)
101101
req, err := s.client.NewRequest("GET", u, nil)
@@ -114,7 +114,7 @@ func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org str
114114

115115
// DeleteOrganizationRunnerGroup deletes a self-hosted runner group from an organization.
116116
//
117-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization
117+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization
118118
func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*Response, error) {
119119
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v", org, groupID)
120120

@@ -128,7 +128,7 @@ func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org
128128

129129
// CreateOrganizationRunnerGroup creates a new self-hosted runner group for an organization.
130130
//
131-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization
131+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization
132132
func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org string, createReq CreateRunnerGroupRequest) (*RunnerGroup, *Response, error) {
133133
u := fmt.Sprintf("orgs/%v/actions/runner-groups", org)
134134
req, err := s.client.NewRequest("POST", u, createReq)
@@ -147,7 +147,7 @@ func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org
147147

148148
// UpdateOrganizationRunnerGroup updates a self-hosted runner group for an organization.
149149
//
150-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization
150+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization
151151
func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org string, groupID int64, updateReq UpdateRunnerGroupRequest) (*RunnerGroup, *Response, error) {
152152
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v", org, groupID)
153153
req, err := s.client.NewRequest("PATCH", u, updateReq)
@@ -166,7 +166,7 @@ func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org
166166

167167
// ListRepositoryAccessRunnerGroup lists the repositories with access to a self-hosted runner group configured in an organization.
168168
//
169-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
169+
// 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
170170
func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, opts *ListOptions) (*ListRepositories, *Response, error) {
171171
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories", org, groupID)
172172
u, err := addOptions(u, opts)
@@ -191,7 +191,7 @@ func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, or
191191
// SetRepositoryAccessRunnerGroup replaces the list of repositories that have access to a self-hosted runner group configured in an organization
192192
// with a new List of repositories.
193193
//
194-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#set-repository-access-for-a-self-hosted-runner-group-in-an-organization
194+
// 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
195195
func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, ids SetRepoAccessRunnerGroupRequest) (*Response, error) {
196196
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories", org, groupID)
197197

@@ -206,7 +206,7 @@ func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org
206206
// AddRepositoryAccessRunnerGroup adds a repository to the list of selected repositories that can access a self-hosted runner group.
207207
// The runner group must have visibility set to 'selected'.
208208
//
209-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#add-repository-access-to-a-self-hosted-runner-group-in-an-organization
209+
// 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
210210
func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) {
211211
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories/%v", org, groupID, repoID)
212212

@@ -221,7 +221,7 @@ func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org
221221
// RemoveRepositoryAccessRunnerGroup removes a repository from the list of selected repositories that can access a self-hosted runner group.
222222
// The runner group must have visibility set to 'selected'.
223223
//
224-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization
224+
// 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
225225
func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) {
226226
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/repositories/%v", org, groupID, repoID)
227227

@@ -235,7 +235,7 @@ func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context,
235235

236236
// ListRunnerGroupRunners lists self-hosted runners that are in a specific organization group.
237237
//
238-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization
238+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization
239239
func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) {
240240
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
241241
u, err := addOptions(u, opts)
@@ -260,7 +260,7 @@ func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string,
260260
// SetRunnerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group
261261
// with a new list of runners.
262262
//
263-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization
263+
// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization
264264
func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) {
265265
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
266266

@@ -274,7 +274,7 @@ func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string,
274274

275275
// AddRunnerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
276276
//
277-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization
277+
// 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
278278
func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
279279
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)
280280

@@ -289,7 +289,7 @@ func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string,
289289
// RemoveRunnerGroupRunners removes a self-hosted runner from a group configured in an organization.
290290
// The runner is then returned to the default group.
291291
//
292-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization
292+
// 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
293293
func (s *ActionsService) RemoveRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
294294
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)
295295

0 commit comments

Comments
 (0)