Skip to content

Commit 585d73b

Browse files
chore: add extraPermissions to generate action.yml
Signed-off-by: Sekhar Sankaramanchi <sekhar@isovalent.com>
1 parent 29824e6 commit 585d73b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ inputs:
3131
description: "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be set to 'read' or 'write'."
3232
permission-administration:
3333
description: "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be set to 'read' or 'write'."
34+
permission-attestations:
35+
description: "The level of permission to grant the access token to create and manage GitHub attestations. Can be set to 'read' or 'write'."
3436
permission-checks:
3537
description: "The level of permission to grant the access token for checks on code. Can be set to 'read' or 'write'."
3638
permission-codespaces:
@@ -123,6 +125,8 @@ inputs:
123125
description: "The level of permission to grant the access token for commit statuses. Can be set to 'read' or 'write'."
124126
permission-team-discussions:
125127
description: "The level of permission to grant the access token to manage team discussions and related comments. Can be set to 'read' or 'write'."
128+
permission-variables:
129+
description: "The level of permission to grant the access token to manage GitHub Actions configuration variables. Can be set to 'read' or 'write'."
126130
permission-vulnerability-alerts:
127131
description: "The level of permission to grant the access token to manage Dependabot alerts. Can be set to 'read' or 'write'."
128132
permission-workflows:

scripts/update-permission-inputs.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,25 @@ await writeFile(
1313
"utf8"
1414
);
1515

16-
const permissionsInputs = Object.entries(appPermissionsSchema.properties)
16+
const extraPermissions = {
17+
variables: {
18+
type: "string",
19+
description:
20+
"The level of permission to grant the access token to manage GitHub Actions configuration variables.",
21+
enum: ["read", "write"],
22+
},
23+
attestations: {
24+
type: "string",
25+
description:
26+
"The level of permission to grant the access token to create and manage GitHub attestations.",
27+
enum: ["read", "write"],
28+
},
29+
};
30+
31+
const permissionsInputs = Object.entries({
32+
...appPermissionsSchema.properties,
33+
...extraPermissions,
34+
})
1735
.sort((a, b) => a[0].localeCompare(b[0]))
1836
.reduce((result, [key, value]) => {
1937
const formatter = new Intl.ListFormat("en", {

0 commit comments

Comments
 (0)