Skip to content

Commit d155407

Browse files
workflows/labels: prevent error on token creation for Test workflow (#437094)
2 parents 6ca23df + 9796879 commit d155407

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
# Use a GitHub App, because it has much higher rate limits: 12,500 instead of 5,000 req / hour.
5252
- uses: actions/create-github-app-token@0f859bf9e69e887678d5bbfbee594437cb440ffe # v2.1.0
53-
if: vars.NIXPKGS_CI_APP_ID
53+
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_APP_ID
5454
id: app-token
5555
with:
5656
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}

ci/github-script/run

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ program
4949
.option('--no-dry', 'Make actual modifications')
5050
.action(async (owner, repo, pr, options) => {
5151
const prepare = (await import('./prepare.js')).default
52-
run(prepare, owner, repo, pr, options)
52+
await run(prepare, owner, repo, pr, options)
5353
})
5454

5555
program
@@ -61,7 +61,7 @@ program
6161
.option('--no-cherry-picks', 'Do not expect cherry-picks.')
6262
.action(async (owner, repo, pr, options) => {
6363
const commits = (await import('./commits.js')).default
64-
run(commits, owner, repo, pr, options)
64+
await run(commits, owner, repo, pr, options)
6565
})
6666

6767
program
@@ -77,7 +77,7 @@ program
7777
try {
7878
process.env.GITHUB_WORKSPACE = tmp
7979
process.chdir(tmp)
80-
run(labels, owner, repo, pr, options)
80+
await run(labels, owner, repo, pr, options)
8181
} finally {
8282
rmSync(tmp, { recursive: true })
8383
}

0 commit comments

Comments
 (0)