Skip to content

Commit 5742a24

Browse files
committed
fix: reset bot approval checks on new commits
1 parent b2e7fac commit 5742a24

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,13 @@ jobs:
6565
}
6666
}
6767
68+
const currentHeadSha = pullRequest.head?.sha
6869
const humanApprovals = [...latestOpinionatedReviewByUser.values()].filter((review) => {
69-
return review.state === "APPROVED" && review.user?.type === "User"
70+
return (
71+
review.state === "APPROVED" &&
72+
review.user?.type === "User" &&
73+
review.commit_id === currentHeadSha
74+
)
7075
})
7176
7277
if (humanApprovals.length < minimumHumanApprovals) {

0 commit comments

Comments
 (0)