Skip to content

Commit 9e261cc

Browse files
authored
Try and make the bot-review-action not hang and/or just fail (#7593)
1. Only enforce the action for bots 2. Trigger action on any PR event, so the status won't get "lost" Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 2e6e163 commit 9e261cc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/approvals.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: PR Approval Check
33
on:
44
pull_request_review:
55
types: [submitted, dismissed]
6+
pull_request:
7+
branches:
8+
- "develop"
69

710
jobs:
811
check-approvals:
@@ -41,7 +44,7 @@ jobs:
4144
console.log(`One-approval bot allowlist: ${oneApprovalBotAuthors.has(authorLogin)}`);
4245
console.log(`Approvals: ${approvalCount} / ${required} required`);
4346
44-
if (approvalCount < required) {
47+
if (isBot && (approvalCount < required)) {
4548
core.setFailed(
4649
`This PR needs ${required} human approval(s) but has ${approvalCount}. ` +
4750
`(Author is ${isBot ? 'a bot' : 'human'})`

0 commit comments

Comments
 (0)