Skip to content

Commit 6397ec7

Browse files
authored
feat: add support for 11 new APIs, plus POST /repos/{owner}/{repo}/dependency-graph/snapshots which was missing from this package (#502)
feat: `PUT /enterprises/{enterprise}/actions/oidc/customization/issuer` feat: `GET /orgs/{org_id}/codespaces` feat: `POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop` feat: `GET /orgs/{org}/actions/oidc/customization/sub` feat: `PUT /orgs/{org}/actions/oidc/customization/sub` feat: `DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}` feat: `GET /repos/{owner}/{repo}/actions/caches` feat: `DELETE /repos/{owner}/{repo}/actions/caches` feat: `DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}` feat: `GET /repos/{owner}/{repo}/actions/oidc/customization/sub` feat: `PUT /repos/{owner}/{repo}/actions/oidc/customization/sub` feat `POST /repos/{owner}/{repo}/dependency-graph/snapshots`
1 parent ea08552 commit 6397ec7

17 files changed

+1917
-207
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Delete a GitHub Actions cache for a repository (using a cache ID)
3+
example: octokit.rest.actions.deleteActionsCacheById({ owner, repo, cache_id })
4+
route: DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Delete a GitHub Actions cache for a repository (using a cache ID)
10+
11+
Deletes a GitHub Actions cache for a repository, using a cache ID.
12+
13+
You must authenticate using an access token with the `repo` scope to use this endpoint.
14+
15+
GitHub Apps must have the `actions:write` permission to use this endpoint.
16+
17+
```js
18+
octokit.rest.actions.deleteActionsCacheById({
19+
owner,
20+
repo,
21+
cache_id,
22+
});
23+
```
24+
25+
## Parameters
26+
27+
<table>
28+
<thead>
29+
<tr>
30+
<th>name</th>
31+
<th>required</th>
32+
<th>description</th>
33+
</tr>
34+
</thead>
35+
<tbody>
36+
<tr><td>owner</td><td>yes</td><td>
37+
38+
The account owner of the repository. The name is not case sensitive.
39+
40+
</td></tr>
41+
<tr><td>repo</td><td>yes</td><td>
42+
43+
The name of the repository. The name is not case sensitive.
44+
45+
</td></tr>
46+
<tr><td>cache_id</td><td>yes</td><td>
47+
48+
The unique identifier of the GitHub Actions cache.
49+
50+
</td></tr>
51+
</tbody>
52+
</table>
53+
54+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id).
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: Delete GitHub Actions caches for a repository (using a cache key)
3+
example: octokit.rest.actions.deleteActionsCacheByKey({ owner, repo, key })
4+
route: DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Delete GitHub Actions caches for a repository (using a cache key)
10+
11+
Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.
12+
13+
You must authenticate using an access token with the `repo` scope to use this endpoint.
14+
15+
GitHub Apps must have the `actions:write` permission to use this endpoint.
16+
17+
```js
18+
octokit.rest.actions.deleteActionsCacheByKey({
19+
owner,
20+
repo,
21+
key,
22+
});
23+
```
24+
25+
## Parameters
26+
27+
<table>
28+
<thead>
29+
<tr>
30+
<th>name</th>
31+
<th>required</th>
32+
<th>description</th>
33+
</tr>
34+
</thead>
35+
<tbody>
36+
<tr><td>owner</td><td>yes</td><td>
37+
38+
The account owner of the repository. The name is not case sensitive.
39+
40+
</td></tr>
41+
<tr><td>repo</td><td>yes</td><td>
42+
43+
The name of the repository. The name is not case sensitive.
44+
45+
</td></tr>
46+
<tr><td>key</td><td>yes</td><td>
47+
48+
A key for identifying the cache.
49+
50+
</td></tr>
51+
<tr><td>ref</td><td>no</td><td>
52+
53+
The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.
54+
55+
</td></tr>
56+
</tbody>
57+
</table>
58+
59+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key).

docs/actions/getActionsCacheList.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: List GitHub Actions caches for a repository
3+
example: octokit.rest.actions.getActionsCacheList({ owner, repo })
4+
route: GET /repos/{owner}/{repo}/actions/caches
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# List GitHub Actions caches for a repository
10+
11+
Lists the GitHub Actions caches for a repository.
12+
You must authenticate using an access token with the `repo` scope to use this endpoint.
13+
GitHub Apps must have the `actions:read` permission to use this endpoint.
14+
15+
```js
16+
octokit.rest.actions.getActionsCacheList({
17+
owner,
18+
repo,
19+
});
20+
```
21+
22+
## Parameters
23+
24+
<table>
25+
<thead>
26+
<tr>
27+
<th>name</th>
28+
<th>required</th>
29+
<th>description</th>
30+
</tr>
31+
</thead>
32+
<tbody>
33+
<tr><td>owner</td><td>yes</td><td>
34+
35+
The account owner of the repository. The name is not case sensitive.
36+
37+
</td></tr>
38+
<tr><td>repo</td><td>yes</td><td>
39+
40+
The name of the repository. The name is not case sensitive.
41+
42+
</td></tr>
43+
<tr><td>per_page</td><td>no</td><td>
44+
45+
The number of results per page (max 100).
46+
47+
</td></tr>
48+
<tr><td>page</td><td>no</td><td>
49+
50+
Page number of the results to fetch.
51+
52+
</td></tr>
53+
<tr><td>ref</td><td>no</td><td>
54+
55+
The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.
56+
57+
</td></tr>
58+
<tr><td>key</td><td>no</td><td>
59+
60+
An explicit key or prefix for identifying the cache
61+
62+
</td></tr>
63+
<tr><td>sort</td><td>no</td><td>
64+
65+
The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes.
66+
67+
</td></tr>
68+
<tr><td>direction</td><td>no</td><td>
69+
70+
The direction to sort the results by.
71+
72+
</td></tr>
73+
</tbody>
74+
</table>
75+
76+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository).
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Set the GitHub Actions OIDC custom issuer policy for an enterprise
3+
example: octokit.rest.actions.setActionsOidcCustomIssuerPolicyForEnterprise({ enterprise })
4+
route: PUT /enterprises/{enterprise}/actions/oidc/customization/issuer
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Set the GitHub Actions OIDC custom issuer policy for an enterprise
10+
11+
Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise.
12+
You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
13+
GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.
14+
15+
```js
16+
octokit.rest.actions.setActionsOidcCustomIssuerPolicyForEnterprise({
17+
enterprise,
18+
});
19+
```
20+
21+
## Parameters
22+
23+
<table>
24+
<thead>
25+
<tr>
26+
<th>name</th>
27+
<th>required</th>
28+
<th>description</th>
29+
</tr>
30+
</thead>
31+
<tbody>
32+
<tr><td>enterprise</td><td>yes</td><td>
33+
34+
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
35+
36+
</td></tr>
37+
<tr><td>include_enterprise_slug</td><td>no</td><td>
38+
39+
Whether the enterprise customer requested a custom issuer URL.
40+
41+
</td></tr>
42+
</tbody>
43+
</table>
44+
45+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions/oidc#set-actions-oidc-custom-issuer-policy-for-enterprise).

docs/codespaces/createForAuthenticatedUser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ Time in minutes before codespace stops from inactivity
8585

8686
Display name for this codespace
8787

88+
</td></tr>
89+
<tr><td>retention_period_minutes</td><td>no</td><td>
90+
91+
Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).
92+
8893
</td></tr>
8994
<tr><td>pull_request</td><td>yes</td><td>
9095

docs/codespaces/createWithPrForAuthenticatedUser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ Time in minutes before codespace stops from inactivity
8787

8888
Display name for this codespace
8989

90+
</td></tr>
91+
<tr><td>retention_period_minutes</td><td>no</td><td>
92+
93+
Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).
94+
9095
</td></tr>
9196
</tbody>
9297
</table>

docs/codespaces/createWithRepoForAuthenticatedUser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ Time in minutes before codespace stops from inactivity
8686

8787
Display name for this codespace
8888

89+
</td></tr>
90+
<tr><td>retention_period_minutes</td><td>no</td><td>
91+
92+
Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).
93+
8994
</td></tr>
9095
</tbody>
9196
</table>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: Delete a codespace from the organization
3+
example: octokit.rest.codespaces.deleteFromOrganization({ org, username, codespace_name })
4+
route: DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}
5+
scope: codespaces
6+
type: API method
7+
---
8+
9+
# Delete a codespace from the organization
10+
11+
Deletes a user's codespace.
12+
13+
You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14+
15+
```js
16+
octokit.rest.codespaces.deleteFromOrganization({
17+
org,
18+
username,
19+
codespace_name,
20+
});
21+
```
22+
23+
## Parameters
24+
25+
<table>
26+
<thead>
27+
<tr>
28+
<th>name</th>
29+
<th>required</th>
30+
<th>description</th>
31+
</tr>
32+
</thead>
33+
<tbody>
34+
<tr><td>org</td><td>yes</td><td>
35+
36+
The organization name. The name is not case sensitive.
37+
38+
</td></tr>
39+
<tr><td>username</td><td>yes</td><td>
40+
41+
The handle for the GitHub user account.
42+
43+
</td></tr>
44+
<tr><td>codespace_name</td><td>yes</td><td>
45+
46+
The name of the codespace.
47+
48+
</td></tr>
49+
</tbody>
50+
</table>
51+
52+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codespaces).

docs/codespaces/listInOrganization.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: List codespaces for the organization
3+
example: octokit.rest.codespaces.listInOrganization({ org_id })
4+
route: GET /orgs/{org_id}/codespaces
5+
scope: codespaces
6+
type: API method
7+
---
8+
9+
# List codespaces for the organization
10+
11+
Lists the codespaces associated to a specified organization.
12+
13+
You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14+
15+
```js
16+
octokit.rest.codespaces.listInOrganization({
17+
org_id,
18+
});
19+
```
20+
21+
## Parameters
22+
23+
<table>
24+
<thead>
25+
<tr>
26+
<th>name</th>
27+
<th>required</th>
28+
<th>description</th>
29+
</tr>
30+
</thead>
31+
<tbody>
32+
<tr><td>per_page</td><td>no</td><td>
33+
34+
The number of results per page (max 100).
35+
36+
</td></tr>
37+
<tr><td>page</td><td>no</td><td>
38+
39+
Page number of the results to fetch.
40+
41+
</td></tr>
42+
<tr><td>org_id</td><td>yes</td><td>
43+
44+
The unique identifier of the organization.
45+
46+
</td></tr>
47+
</tbody>
48+
</table>
49+
50+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codespaces#list-in-organization).

0 commit comments

Comments
 (0)