Skip to content

Commit 16a1a93

Browse files
committed
docs: Add apiVersion to GitHub API link
1 parent 9ad687d commit 16a1a93

File tree

180 files changed

+1370
-1298
lines changed

Some content is hidden

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

180 files changed

+1370
-1298
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Every exported method and type needs to have code comments that follow
159159
```go
160160
// Get fetches a repository.
161161
//
162-
// GitHub API docs: https://docs.github.com/rest/repos/repos#get-a-repository
162+
// GitHub API docs: https://docs.github.com/rest/repos/repos?apiVersion=2022-11-28#get-a-repository
163163
//
164164
//meta:operation GET /repos/{owner}/{repo}
165165
func (s *RepositoriesService) Get(ctx context.Context, owner, repo string) (*Repository, *Response, error) {

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/rest/actions/
11+
// GitHub API docs: https://docs.github.com/rest/actions?apiVersion=2022-11-28
1212
type ActionsService service

github/actions_artifacts.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
// ArtifactWorkflowRun represents a GitHub artifact's workflow run.
1616
//
17-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts
17+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28
1818
type ArtifactWorkflowRun struct {
1919
ID *int64 `json:"id,omitempty"`
2020
RepositoryID *int64 `json:"repository_id,omitempty"`
@@ -27,7 +27,7 @@ type ArtifactWorkflowRun struct {
2727
// data between jobs in a workflow and provide storage for data
2828
// once a workflow is complete.
2929
//
30-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts
30+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28
3131
type Artifact struct {
3232
ID *int64 `json:"id,omitempty"`
3333
NodeID *string `json:"node_id,omitempty"`
@@ -48,7 +48,7 @@ type Artifact struct {
4848

4949
// ArtifactList represents a list of GitHub artifacts.
5050
//
51-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#artifacts
51+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28#artifacts
5252
type ArtifactList struct {
5353
TotalCount *int64 `json:"total_count,omitempty"`
5454
Artifacts []*Artifact `json:"artifacts,omitempty"`
@@ -81,7 +81,7 @@ type ArtifactPeriodOpt struct {
8181

8282
// ListArtifacts lists all artifacts that belong to a repository.
8383
//
84-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#list-artifacts-for-a-repository
84+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28#list-artifacts-for-a-repository
8585
//
8686
//meta:operation GET /repos/{owner}/{repo}/actions/artifacts
8787
func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string, opts *ListArtifactsOptions) (*ArtifactList, *Response, error) {
@@ -107,7 +107,7 @@ func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string,
107107

108108
// ListWorkflowRunArtifacts lists all artifacts that belong to a workflow run.
109109
//
110-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#list-workflow-run-artifacts
110+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28#list-workflow-run-artifacts
111111
//
112112
//meta:operation GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts
113113
func (s *ActionsService) ListWorkflowRunArtifacts(ctx context.Context, owner, repo string, runID int64, opts *ListOptions) (*ArtifactList, *Response, error) {
@@ -133,7 +133,7 @@ func (s *ActionsService) ListWorkflowRunArtifacts(ctx context.Context, owner, re
133133

134134
// GetArtifact gets a specific artifact for a workflow run.
135135
//
136-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#get-an-artifact
136+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28#get-an-artifact
137137
//
138138
//meta:operation GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
139139
func (s *ActionsService) GetArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Artifact, *Response, error) {
@@ -155,7 +155,7 @@ func (s *ActionsService) GetArtifact(ctx context.Context, owner, repo string, ar
155155

156156
// DownloadArtifact gets a redirect URL to download an archive for a repository.
157157
//
158-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#download-an-artifact
158+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28#download-an-artifact
159159
//
160160
//meta:operation GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}
161161
func (s *ActionsService) DownloadArtifact(ctx context.Context, owner, repo string, artifactID int64, maxRedirects int) (*url.URL, *Response, error) {
@@ -209,7 +209,7 @@ func (s *ActionsService) downloadArtifactWithRateLimit(ctx context.Context, u st
209209

210210
// DeleteArtifact deletes a workflow run artifact.
211211
//
212-
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#delete-an-artifact
212+
// GitHub API docs: https://docs.github.com/rest/actions/artifacts?apiVersion=2022-11-28#delete-an-artifact
213213
//
214214
//meta:operation DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
215215
func (s *ActionsService) DeleteArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Response, error) {

github/actions_cache.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// ActionsCache represents a GitHub action cache.
1414
//
15-
// GitHub API docs: https://docs.github.com/rest/actions/cache#about-the-cache-api
15+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#about-the-cache-api
1616
type ActionsCache struct {
1717
ID *int64 `json:"id,omitempty" url:"-"`
1818
Ref *string `json:"ref,omitempty" url:"ref"`
@@ -25,15 +25,15 @@ type ActionsCache struct {
2525

2626
// ActionsCacheList represents a list of GitHub actions Cache.
2727
//
28-
// GitHub API docs: https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository
28+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#list-github-actions-caches-for-a-repository
2929
type ActionsCacheList struct {
3030
TotalCount int `json:"total_count"`
3131
ActionsCaches []*ActionsCache `json:"actions_caches,omitempty"`
3232
}
3333

3434
// ActionsCacheUsage represents a GitHub Actions Cache Usage object.
3535
//
36-
// GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-a-repository
36+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-a-repository
3737
type ActionsCacheUsage struct {
3838
FullName string `json:"full_name"`
3939
ActiveCachesSizeInBytes int64 `json:"active_caches_size_in_bytes"`
@@ -42,23 +42,23 @@ type ActionsCacheUsage struct {
4242

4343
// ActionsCacheUsageList represents a list of repositories with GitHub Actions cache usage for an organization.
4444
//
45-
// GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-a-repository
45+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-a-repository
4646
type ActionsCacheUsageList struct {
4747
TotalCount int `json:"total_count"`
4848
RepoCacheUsage []*ActionsCacheUsage `json:"repository_cache_usages,omitempty"`
4949
}
5050

5151
// TotalCacheUsage represents total GitHub actions cache usage of an organization or enterprise.
5252
//
53-
// GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-an-enterprise
53+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-an-enterprise
5454
type TotalCacheUsage struct {
5555
TotalActiveCachesUsageSizeInBytes int64 `json:"total_active_caches_size_in_bytes"`
5656
TotalActiveCachesCount int `json:"total_active_caches_count"`
5757
}
5858

5959
// ActionsCacheListOptions represents a list of all possible optional Query parameters for ListCaches method.
6060
//
61-
// GitHub API docs: https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository
61+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#list-github-actions-caches-for-a-repository
6262
type ActionsCacheListOptions struct {
6363
ListOptions
6464
// The Git reference for the results you want to list.
@@ -77,7 +77,7 @@ type ActionsCacheListOptions struct {
7777
//
7878
// Permissions: must have the actions:read permission to use this endpoint.
7979
//
80-
// GitHub API docs: https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository
80+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#list-github-actions-caches-for-a-repository
8181
//
8282
//meta:operation GET /repos/{owner}/{repo}/actions/caches
8383
func (s *ActionsService) ListCaches(ctx context.Context, owner, repo string, opts *ActionsCacheListOptions) (*ActionsCacheList, *Response, error) {
@@ -109,7 +109,7 @@ func (s *ActionsService) ListCaches(ctx context.Context, owner, repo string, opt
109109
//
110110
// Permissions: You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
111111
//
112-
// GitHub API docs: https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key
112+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key
113113
//
114114
//meta:operation DELETE /repos/{owner}/{repo}/actions/caches
115115
func (s *ActionsService) DeleteCachesByKey(ctx context.Context, owner, repo, key string, ref *string) (*Response, error) {
@@ -131,7 +131,7 @@ func (s *ActionsService) DeleteCachesByKey(ctx context.Context, owner, repo, key
131131
//
132132
// Permissions: You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
133133
//
134-
// GitHub API docs: https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
134+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
135135
//
136136
//meta:operation DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}
137137
func (s *ActionsService) DeleteCachesByID(ctx context.Context, owner, repo string, cacheID int64) (*Response, error) {
@@ -150,7 +150,7 @@ func (s *ActionsService) DeleteCachesByID(ctx context.Context, owner, repo strin
150150
// Permissions: Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an
151151
// access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
152152
//
153-
// GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-a-repository
153+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-a-repository
154154
//
155155
//meta:operation GET /repos/{owner}/{repo}/actions/cache/usage
156156
func (s *ActionsService) GetCacheUsageForRepo(ctx context.Context, owner, repo string) (*ActionsCacheUsage, *Response, error) {
@@ -175,7 +175,7 @@ func (s *ActionsService) GetCacheUsageForRepo(ctx context.Context, owner, repo s
175175
// Permissions: You must authenticate using an access token with the read:org scope to use this endpoint.
176176
// GitHub Apps must have the organization_administration:read permission to use this endpoint.
177177
//
178-
// GitHub API docs: https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization
178+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#list-repositories-with-github-actions-cache-usage-for-an-organization
179179
//
180180
//meta:operation GET /orgs/{org}/actions/cache/usage-by-repository
181181
func (s *ActionsService) ListCacheUsageByRepoForOrg(ctx context.Context, org string, opts *ListOptions) (*ActionsCacheUsageList, *Response, error) {
@@ -205,7 +205,7 @@ func (s *ActionsService) ListCacheUsageByRepoForOrg(ctx context.Context, org str
205205
// Permissions: You must authenticate using an access token with the read:org scope to use this endpoint.
206206
// GitHub Apps must have the organization_administration:read permission to use this endpoint.
207207
//
208-
// GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-an-organization
208+
// GitHub API docs: https://docs.github.com/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-an-organization
209209
//
210210
//meta:operation GET /orgs/{org}/actions/cache/usage
211211
func (s *ActionsService) GetTotalCacheUsageForOrg(ctx context.Context, org string) (*TotalCacheUsage, *Response, error) {
@@ -229,7 +229,7 @@ func (s *ActionsService) GetTotalCacheUsageForOrg(ctx context.Context, org strin
229229
//
230230
// Permissions: You must authenticate using an access token with the "admin:enterprise" scope to use this endpoint.
231231
//
232-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/cache#get-github-actions-cache-usage-for-an-enterprise
232+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-an-enterprise
233233
//
234234
//meta:operation GET /enterprises/{enterprise}/actions/cache/usage
235235
func (s *ActionsService) GetTotalCacheUsageForEnterprise(ctx context.Context, enterprise string) (*TotalCacheUsage, *Response, error) {

0 commit comments

Comments
 (0)