Skip to content

Commit fd96c32

Browse files
feat: .actions.{getCustomOidcSubClaimForRepo,setCustomOidcSubClaimForRepo}, .oidc.{getOidcCustomSubTemplateForOrg,updateOidcCustomSubTemplateForOrg} (#714)
1 parent 0927dde commit fd96c32

File tree

10 files changed

+520
-4
lines changed

10 files changed

+520
-4
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Get the customization template for an OIDC subject claim for a repository
3+
example: octokit.rest.actions.getCustomOidcSubClaimForRepo({ owner, repo })
4+
route: GET /repos/{owner}/{repo}/actions/oidc/customization/sub
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Get the customization template for an OIDC subject claim for a repository
10+
11+
Gets the customization template for an OpenID Connect (OIDC) subject claim.
12+
You must authenticate using an access token with the `repo` scope to use this
13+
endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint.
14+
15+
```js
16+
octokit.rest.actions.getCustomOidcSubClaimForRepo({
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 without the `.git` extension. The name is not case sensitive.
41+
42+
</td></tr>
43+
</tbody>
44+
</table>
45+
46+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository).
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Set the customization template for an OIDC subject claim for a repository
3+
example: octokit.rest.actions.setCustomOidcSubClaimForRepo({ owner, repo, use_default })
4+
route: PUT /repos/{owner}/{repo}/actions/oidc/customization/sub
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Set the customization template for an OIDC subject claim for a repository
10+
11+
Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository.
12+
You must authenticate using an access token with the `repo` scope to use this
13+
endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
14+
15+
```js
16+
octokit.rest.actions.setCustomOidcSubClaimForRepo({
17+
owner,
18+
repo,
19+
use_default,
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>owner</td><td>yes</td><td>
35+
36+
The account owner of the repository. The name is not case sensitive.
37+
38+
</td></tr>
39+
<tr><td>repo</td><td>yes</td><td>
40+
41+
The name of the repository without the `.git` extension. The name is not case sensitive.
42+
43+
</td></tr>
44+
<tr><td>use_default</td><td>yes</td><td>
45+
46+
Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored.
47+
48+
</td></tr>
49+
<tr><td>include_claim_keys</td><td>no</td><td>
50+
51+
Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.
52+
53+
</td></tr>
54+
</tbody>
55+
</table>
56+
57+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository).
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Get the customization template for an OIDC subject claim for an organization
3+
example: octokit.rest.oidc.getOidcCustomSubTemplateForOrg({ org })
4+
route: GET /orgs/{org}/actions/oidc/customization/sub
5+
scope: oidc
6+
type: API method
7+
---
8+
9+
# Get the customization template for an OIDC subject claim for an organization
10+
11+
Gets the customization template for an OpenID Connect (OIDC) subject claim.
12+
You must authenticate using an access token with the `read:org` scope to use this endpoint.
13+
GitHub Apps must have the `organization_administration:write` permission to use this endpoint.
14+
15+
```js
16+
octokit.rest.oidc.getOidcCustomSubTemplateForOrg({
17+
org,
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>org</td><td>yes</td><td>
33+
34+
The organization name. The name is not case sensitive.
35+
36+
</td></tr>
37+
</tbody>
38+
</table>
39+
40+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization).
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Set the customization template for an OIDC subject claim for an organization
3+
example: octokit.rest.oidc.updateOidcCustomSubTemplateForOrg({ org, include_claim_keys })
4+
route: PUT /orgs/{org}/actions/oidc/customization/sub
5+
scope: oidc
6+
type: API method
7+
---
8+
9+
# Set the customization template for an OIDC subject claim for an organization
10+
11+
Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.
12+
You must authenticate using an access token with the `write:org` scope to use this endpoint.
13+
GitHub Apps must have the `admin:org` permission to use this endpoint.
14+
15+
```js
16+
octokit.rest.oidc.updateOidcCustomSubTemplateForOrg({
17+
org,
18+
include_claim_keys,
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>org</td><td>yes</td><td>
34+
35+
The organization name. The name is not case sensitive.
36+
37+
</td></tr>
38+
<tr><td>include_claim_keys</td><td>yes</td><td>
39+
40+
Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.
41+
42+
</td></tr>
43+
</tbody>
44+
</table>
45+
46+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization).

package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/sinon": "^17.0.0",
3636
"esbuild": "^0.20.0",
3737
"fetch-mock": "npm:@gr2m/fetch-mock@^9.11.0-pull-request-644.1",
38-
"github-openapi-graphql-query": "^4.0.0",
38+
"github-openapi-graphql-query": "^4.3.1",
3939
"glob": "^10.2.6",
4040
"jest": "^29.0.0",
4141
"lodash.camelcase": "^4.3.0",

0 commit comments

Comments
 (0)