Automatically invalidate PR approvals in case of new commits #4331

Closed
opened 2025-11-02 05:46:36 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @manuelmohr on GitHub (Nov 15, 2019).

  • Gitea version (or commit ref): 1.10.0
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04.3 LTS
  • Can you reproduce the bug at https://try.gitea.io:
    • Not relevant

Description

Once a pull request has been approved, additional commits can be added to the pull request (potentially completely changing the proposed change) but the approving review stays valid.

While this makes it easy to sneak in minor fixes after a review without going through another review round, for some projects this poses an unacceptable risk.

Example:

  • Junior developer creates PR.
  • Senior developer reviews and approves.
  • Junior developer adds another "innocent" commit that actually introduces a bug.
  • Pull request is merged as it has an approving review.
  • There's now a bug in the software.

I propose to add an option in the style of Github (see below) to enable automatic invalidation of approvals as soon as the PR is changed.

Screenshots

image

Originally created by @manuelmohr on GitHub (Nov 15, 2019). - Gitea version (or commit ref): 1.10.0 - Git version: 2.17.1 - Operating system: Ubuntu 18.04.3 LTS - Can you reproduce the bug at https://try.gitea.io: - [x] Not relevant ## Description Once a pull request has been approved, additional commits can be added to the pull request (potentially completely changing the proposed change) **but the approving review stays valid**. While this makes it easy to sneak in minor fixes after a review without going through another review round, for some projects this poses an unacceptable risk. Example: - Junior developer creates PR. - Senior developer reviews and approves. - Junior developer adds another "innocent" commit that actually introduces a bug. - Pull request is merged as it has an approving review. - There's now a bug in the software. I propose to add an option in the style of Github (see below) to enable automatic invalidation of approvals as soon as the PR is changed. ## Screenshots ![image](https://user-images.githubusercontent.com/3143777/68927030-24f16280-0787-11ea-969c-d75d01d56d23.png)
GiteaMirror added the issue/duplicate label 2025-11-02 05:46:36 -06:00
Author
Owner

@davidsvantesson commented on GitHub (Nov 15, 2019):

Duplicate of #5997.

@davidsvantesson commented on GitHub (Nov 15, 2019): Duplicate of #5997.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4331