sturdy-dev / codeball-action

🔮 Codeball – AI Code Review that finds bugs and fast-tracks your code

Home Page:https://codeball.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Codeball ran on a PR
  2. Codeball result was confidence 0.98 (workflow run link)
    1. PR approved by Codeball
    2. PR labeled codeball:approved by Codeball
  3. A merge commit was pushed to the branch
  4. Codeball ran a second time on the PR
  5. Codeball result was confidence 0.137 (workflow run link)
    1. PR labeled codeball:needs-careful-review by Codeball

Screenshot

Screen Shot 2022-09-10 at 02 31 46

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!

Screenshot 2022-09-12 at 09 59 39

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!