Intelligent 'Dismiss stale approvals when new commits are pushed' #12876
|
There is a Github branch protection setting called "Dismiss stale pull request approvals when new commits are pushed". Unfortunately, this one won't allow a workflow with fixup and squash commits. Feature RequestDuring a PR review with it's common that 1-2 fixup commits are added to address reviewer concerns. It would be good if the PR approvals were not dismissed, in the scenario where commits are squashed, but no actual files has changed, i.e. there are no code changes, only commits being moved around or merged. Example Scenario
Solution: Would be great if a SHA-hash of the entire diff (or each individual touched file in PR) was compared instead, and if they are identical the existing approval is not considered stale, even if commits have changed. |
Replies: 8 comments 18 replies
|
While this may seem to be a minor feature it would improve development flows a lot at low cost |
|
Rebasing my changes with latest commit without any code change should not lead to dismissal of review either. This promotes people to push stale code v/s getting their code reviewed again. |
|
This request fixes an incessant annoyance for me. |
|
If even Bitbucket can do it then surely GitHub can? 🤔 |
|
The problem i see is this , our branch is defined to be up-to-date , so if someone approved my PR and i need to rebase the approval goes away, this is very annoying as it might happen couple of times a day. |
|
Thanks for the feedback. As part of the security changes we made to review policies (see this blog post), we also enabled the use-cases you are asking about:
...or any combination of those operations. Regards, Daryl |
|
YMMV, but I have observed in the last few weeks that GitHub's stale review dismissal is much improved. I've tried a few sorts of rebase/squash operations and it seems if the committed text is unchanged, GitHub no longer marks the review as stale. |


@sandstrom @shlomiken
Thanks for the feedback. As part of the security changes we made to review policies (see this blog post), we also enabled the use-cases you are asking about:
...or any combination of those operations.
Regards, Daryl