Skip to content

Commit dc67347

Browse files
committed
fix: out-of-scope variable in catch block
1 parent 80c4b11 commit dc67347

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/integration-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ jobs:
7575
with:
7676
result-encoding: string
7777
script: |
78+
let username;
7879
try {
79-
let username;
8080
if (context.payload.pull_request) {
8181
username = context.payload.pull_request.user.login;
8282
} else {
@@ -99,7 +99,7 @@ jobs:
9999
return "auto-approve"
100100
}
101101
} catch (error) {
102-
console.log(`${username} does not have write access. Requiring Manual Approval to run PR Checks.`)
102+
console.log(`Permission check failed for ${username}. Requiring Manual Approval to run PR Checks. Error: ${error.message}`);
103103
return "manual-approval"
104104
}
105105

0 commit comments

Comments
 (0)