Skip to content

Commit 2b74026

Browse files
committed
fix: rerun bot approval gate on draft state changes
1 parent 5742a24 commit 2b74026

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/bot-pr-human-approval.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Bot PR human approval gate
22

33
on:
44
pull_request_target:
5-
types: [opened, reopened, ready_for_review, synchronize]
5+
types: [opened, reopened, synchronize]
6+
pull_request:
7+
types: [ready_for_review, converted_to_draft]
68
pull_request_review:
79
types: [submitted, dismissed]
810

@@ -40,7 +42,9 @@ jobs:
4042
}
4143
4244
if (pullRequest.draft) {
43-
core.notice(`Skipping approval gate for draft bot PR #${pullRequest.number}.`)
45+
core.setFailed(
46+
`Bot PR #${pullRequest.number} is still a draft. Mark it ready for review and collect ${minimumHumanApprovals} human approvals on the current head to satisfy this gate.`,
47+
)
4448
return
4549
}
4650

0 commit comments

Comments
 (0)