Skip to content

Commit a58af20

Browse files
authored
[arm-auto-signoff] Add permission "statuses: read" (#36551)
- replaces previous premission "checks: read"
1 parent 5e35edc commit a58af20

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/arm-auto-signoff.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ on:
1616
types: [completed]
1717

1818
permissions:
19+
# actions.listWorkflowRunsForRepo
20+
# actions.listWorkflowRunArtifacts
1921
actions: read
20-
checks: read
22+
# default
2123
contents: read
24+
# issues.listLabelsOnIssue
2225
issues: read
26+
# issues.listLabelsOnIssue
2327
pull-requests: read
28+
# repos.listCommitStatusesForRef
29+
statuses: read
2430

2531
jobs:
2632
arm-auto-signoff:

.github/workflows/src/arm-auto-signoff.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export async function getLabelActionImpl({ owner, repo, issue_number, head_sha,
5656
};
5757

5858
// TODO: Try to extract labels from context (when available) to avoid unnecessary API call
59+
// permissions: { issues: read, pull-requests: read }
5960
const labels = await github.paginate(github.rest.issues.listLabelsOnIssue, {
6061
owner: owner,
6162
repo: repo,
@@ -72,6 +73,7 @@ export async function getLabelActionImpl({ owner, repo, issue_number, head_sha,
7273

7374
core.info(`Labels: ${labelNames}`);
7475

76+
// permissions: { actions: read }
7577
const workflowRuns = await github.paginate(github.rest.actions.listWorkflowRunsForRepo, {
7678
owner,
7779
repo,
@@ -106,6 +108,7 @@ export async function getLabelActionImpl({ owner, repo, issue_number, head_sha,
106108
return removeAction;
107109
}
108110

111+
// permissions: { actions: read }
109112
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {
110113
owner,
111114
repo,
@@ -143,6 +146,7 @@ export async function getLabelActionImpl({ owner, repo, issue_number, head_sha,
143146
return removeAction;
144147
}
145148

149+
// permissions: { statuses: read }
146150
const statuses = await github.paginate(github.rest.repos.listCommitStatusesForRef, {
147151
owner: owner,
148152
repo: repo,

0 commit comments

Comments
 (0)