Skip to content

Commit 6e73e66

Browse files
authored
chore(prlint): get sha from context (#25457)
The `sha` doesn't exist in some of the payloads, but should always exist in the event context. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent c3744ae commit 6e73e66

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/@aws-cdk/prlint/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function run() {
2929
repo: github.context.repo.repo,
3030
number: github.context.issue.number,
3131
});
32-
await prLinter.validatePullRequestTarget(github.context.payload.sha);
32+
await prLinter.validatePullRequestTarget(github.context.sha);
3333
}
3434
} catch (error: any) {
3535
core.setFailed(error.message);

tools/@aws-cdk/prlint/lint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export class PullRequestLinter {
453453
await this.assessNeedsReview(pr);
454454
}
455455
} catch (e) {
456-
console.log('assessing review failed: ', e);
456+
console.log(`assessing review failed for sha ${sha}: `, e);
457457
}
458458
}
459459

0 commit comments

Comments
 (0)