How to un-approve github review after new commits automatically
Asked Answered
S

2

49

Once a pull request is approved, if there are further commits:

The Pull request should go to un-approved state automatically.

Can this be done?

Salpingectomy answered 24/1, 2017 at 9:22 Comment(0)
E
64

The ability to Dismiss stale pull request approvals when new commits are pushed is a setting under Require pull request reviews before merging in the branch protection settings. This is disabled by default.

dismiss stale pull request

Edana answered 25/6, 2017 at 14:35 Comment(2)
Does this also invalidate approval if the branch is rebased?Gualterio
@Alper, yes. Although for the last week I see that our approvals were not dismissed despite any changes to the PRs. Maybe a temporary glitch because it's been working for well ages. Note though that since some time the approval is not dismissed on rebase in case the actual diff stays the same.Leu
E
9

This isn't currently offered.

You can create an application that listens for push webhook events, queries the API for all Reviews for a Pull Request, and dismisses any that are APPROVED.

Here is a Ruby script you could host on heroku.

Edana answered 25/1, 2017 at 4:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.