Dismiss PR approval when changing from "Approved -> Needs Careful Review"
ChrisCarini opened this issue · comments
Details
I have a PR (see link in 'info' section below) that followed the below order of events:
- Codeball ran on a PR
- Codeball result was confidence
0.98
(workflow run link)- PR approved by Codeball
- PR labeled
codeball:approved
by Codeball
- A merge commit was pushed to the branch
- Codeball ran a second time on the PR
- Codeball result was confidence
0.137
(workflow run link)- PR labeled
codeball:needs-careful-review
by Codeball
- PR labeled
Screenshot
Expected
In step 5.ii
, the previous approval on the PR approval is removed/dismissed.
Actual
The PR remained with an approval.
Info
PR: ChrisCarini/sample-intellij-plugin#87
Codeball Workflow: https://github.com/ChrisCarini/sample-intellij-plugin/blob/master/.github/workflows/codeball.yml
Hey, thanks for opening an issue! 👏
This makes a lot of sense. I've had a habit of enabling the "Dismiss stale pull request approvals when new commits are pushed" branch protection rule on GitHub (see screenshot) that does this automatically, which is why it a bit of a oversight that Codeball does not do this by itself yet.
Adding it to Codeball should be easy, I'll let you know when it's ready!
Fixed as of #94, released in v2.6.0.
Thank you @zegl - what's weird is I do have that setting enabled on my repos, so I'm not sure exactly why it did not revoke the approval. Either way, I really appreciate you knocking this one out!