Skip to content

Commit a64f3a6

Browse files
authored
Update URLs (google#1659)
1 parent df27af0 commit a64f3a6

File tree

101 files changed

+896
-900
lines changed

Some content is hidden

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

101 files changed

+896
-900
lines changed

CONTRIBUTING.md

+2-2
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/rest/reference/repos#webhooks> live in
90+
defined at <https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#webhooks> live in
9191
[repos_hooks.go][].
9292

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

9696

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ repos, _, err := client.Repositories.ListByOrg(context.Background(), "github", o
4747

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

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

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

142142
### Accepted Status ###
143143

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

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

170170
### Creating and Updating Resources ###
171171

github/actions.go

+1-1
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/rest/reference/actions/
11+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/
1212
type ActionsService service

github/actions_artifacts.go

+7-7
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/rest/reference/actions/artifacts/
19+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/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/rest/reference/actions/artifacts/
33+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/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/rest/reference/actions/#list-artifacts-for-a-repository
41+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#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/rest/reference/actions/#list-workflow-run-artifacts
65+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#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/rest/reference/actions/#get-an-artifact
89+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#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/rest/reference/actions/artifacts/#download-an-artifact
109+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/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

@@ -151,7 +151,7 @@ func (s *ActionsService) getDownloadArtifactFromURL(ctx context.Context, u strin
151151

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

github/actions_runners.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type ActionsEnabledOnOrgRepos struct {
2626

2727
// ListRunnerApplicationDownloads lists self-hosted runner application binaries that can be downloaded and run.
2828
//
29-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#list-runner-applications-for-a-repository
29+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-runner-applications-for-a-repository
3030
func (s *ActionsService) ListRunnerApplicationDownloads(ctx context.Context, owner, repo string) ([]*RunnerApplicationDownload, *Response, error) {
3131
u := fmt.Sprintf("repos/%v/%v/actions/runners/downloads", owner, repo)
3232
req, err := s.client.NewRequest("GET", u, nil)
@@ -51,7 +51,7 @@ type RegistrationToken struct {
5151

5252
// CreateRegistrationToken creates a token that can be used to add a self-hosted runner.
5353
//
54-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#create-a-registration-token-for-a-repository
54+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#create-a-registration-token-for-a-repository
5555
func (s *ActionsService) CreateRegistrationToken(ctx context.Context, owner, repo string) (*RegistrationToken, *Response, error) {
5656
u := fmt.Sprintf("repos/%v/%v/actions/runners/registration-token", owner, repo)
5757

@@ -94,7 +94,7 @@ type Runners struct {
9494

9595
// ListRunners lists all the self-hosted runners for a repository.
9696
//
97-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#list-self-hosted-runners-for-a-repository
97+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-self-hosted-runners-for-a-repository
9898
func (s *ActionsService) ListRunners(ctx context.Context, owner, repo string, opts *ListOptions) (*Runners, *Response, error) {
9999
u := fmt.Sprintf("repos/%v/%v/actions/runners", owner, repo)
100100
u, err := addOptions(u, opts)
@@ -118,7 +118,7 @@ func (s *ActionsService) ListRunners(ctx context.Context, owner, repo string, op
118118

119119
// GetRunner gets a specific self-hosted runner for a repository using its runner ID.
120120
//
121-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#get-a-self-hosted-runner-for-a-repository
121+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#get-a-self-hosted-runner-for-a-repository
122122
func (s *ActionsService) GetRunner(ctx context.Context, owner, repo string, runnerID int64) (*Runner, *Response, error) {
123123
u := fmt.Sprintf("repos/%v/%v/actions/runners/%v", owner, repo, runnerID)
124124
req, err := s.client.NewRequest("GET", u, nil)
@@ -143,7 +143,7 @@ type RemoveToken struct {
143143

144144
// CreateRemoveToken creates a token that can be used to remove a self-hosted runner from a repository.
145145
//
146-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#create-a-remove-token-for-a-repository
146+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#create-a-remove-token-for-a-repository
147147
func (s *ActionsService) CreateRemoveToken(ctx context.Context, owner, repo string) (*RemoveToken, *Response, error) {
148148
u := fmt.Sprintf("repos/%v/%v/actions/runners/remove-token", owner, repo)
149149

@@ -163,7 +163,7 @@ func (s *ActionsService) CreateRemoveToken(ctx context.Context, owner, repo stri
163163

164164
// RemoveRunner forces the removal of a self-hosted runner in a repository using the runner id.
165165
//
166-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#delete-a-self-hosted-runner-from-a-repository
166+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#delete-a-self-hosted-runner-from-a-repository
167167
func (s *ActionsService) RemoveRunner(ctx context.Context, owner, repo string, runnerID int64) (*Response, error) {
168168
u := fmt.Sprintf("repos/%v/%v/actions/runners/%v", owner, repo, runnerID)
169169

@@ -177,7 +177,7 @@ func (s *ActionsService) RemoveRunner(ctx context.Context, owner, repo string, r
177177

178178
// ListOrganizationRunnerApplicationDownloads lists self-hosted runner application binaries that can be downloaded and run.
179179
//
180-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#list-runner-applications-for-an-organization
180+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-runner-applications-for-an-organization
181181
func (s *ActionsService) ListOrganizationRunnerApplicationDownloads(ctx context.Context, owner string) ([]*RunnerApplicationDownload, *Response, error) {
182182
u := fmt.Sprintf("orgs/%v/actions/runners/downloads", owner)
183183
req, err := s.client.NewRequest("GET", u, nil)
@@ -196,7 +196,7 @@ func (s *ActionsService) ListOrganizationRunnerApplicationDownloads(ctx context.
196196

197197
// CreateOrganizationRegistrationToken creates a token that can be used to add a self-hosted runner to an organization.
198198
//
199-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#create-a-registration-token-for-an-organization
199+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#create-a-registration-token-for-an-organization
200200
func (s *ActionsService) CreateOrganizationRegistrationToken(ctx context.Context, owner string) (*RegistrationToken, *Response, error) {
201201
u := fmt.Sprintf("orgs/%v/actions/runners/registration-token", owner)
202202

@@ -216,7 +216,7 @@ func (s *ActionsService) CreateOrganizationRegistrationToken(ctx context.Context
216216

217217
// ListOrganizationRunners lists all the self-hosted runners for an organization.
218218
//
219-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#list-self-hosted-runners-for-an-organization
219+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-self-hosted-runners-for-an-organization
220220
func (s *ActionsService) ListOrganizationRunners(ctx context.Context, owner string, opts *ListOptions) (*Runners, *Response, error) {
221221
u := fmt.Sprintf("orgs/%v/actions/runners", owner)
222222
u, err := addOptions(u, opts)
@@ -240,7 +240,7 @@ func (s *ActionsService) ListOrganizationRunners(ctx context.Context, owner stri
240240

241241
// ListEnabledReposInOrg lists the selected repositories that are enabled for GitHub Actions in an organization.
242242
//
243-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization
243+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#list-selected-repositories-enabled-for-github-actions-in-an-organization
244244
func (s *ActionsService) ListEnabledReposInOrg(ctx context.Context, owner string, opts *ListOptions) (*ActionsEnabledOnOrgRepos, *Response, error) {
245245
u := fmt.Sprintf("orgs/%v/actions/permissions/repositories", owner)
246246
u, err := addOptions(u, opts)
@@ -264,7 +264,7 @@ func (s *ActionsService) ListEnabledReposInOrg(ctx context.Context, owner string
264264

265265
// GetOrganizationRunner gets a specific self-hosted runner for an organization using its runner ID.
266266
//
267-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#get-a-self-hosted-runner-for-an-organization
267+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#get-a-self-hosted-runner-for-an-organization
268268
func (s *ActionsService) GetOrganizationRunner(ctx context.Context, owner string, runnerID int64) (*Runner, *Response, error) {
269269
u := fmt.Sprintf("orgs/%v/actions/runners/%v", owner, runnerID)
270270
req, err := s.client.NewRequest("GET", u, nil)
@@ -283,7 +283,7 @@ func (s *ActionsService) GetOrganizationRunner(ctx context.Context, owner string
283283

284284
// CreateOrganizationRemoveToken creates a token that can be used to remove a self-hosted runner from an organization.
285285
//
286-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#create-a-remove-token-for-an-organization
286+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#create-a-remove-token-for-an-organization
287287
func (s *ActionsService) CreateOrganizationRemoveToken(ctx context.Context, owner string) (*RemoveToken, *Response, error) {
288288
u := fmt.Sprintf("orgs/%v/actions/runners/remove-token", owner)
289289

@@ -303,7 +303,7 @@ func (s *ActionsService) CreateOrganizationRemoveToken(ctx context.Context, owne
303303

304304
// RemoveOrganizationRunner forces the removal of a self-hosted runner from an organization using the runner id.
305305
//
306-
// GitHub API docs: https://docs.github.com/en/rest/reference/actions/#delete-a-self-hosted-runner-from-an-organization
306+
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#delete-a-self-hosted-runner-from-an-organization
307307
func (s *ActionsService) RemoveOrganizationRunner(ctx context.Context, owner string, runnerID int64) (*Response, error) {
308308
u := fmt.Sprintf("orgs/%v/actions/runners/%v", owner, runnerID)
309309

0 commit comments

Comments
 (0)