Skip to content

[feature] - Clear approvals if new commit is pushed #5997

Closed
@zopanix

Description

@zopanix
  • Gitea version (or commit ref): 1.7.1
  • Git version: n/a
  • Operating system: docker gitea/gitea:1.7.1
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: N/A

Description

As a user, I want to be able to discard approvals automatically on my PR if a new commit has been pushed on my branch.

In our current workflow, we would like to be able to reset approvals completely if someone pushes a new commit on the PR. We've had some ninja pushes to repo's like that in the past and this feature would enforce our workflow.

I would imagine this feature being located in the branch section of the repository, when I enable protected branches, it would be an additional checkbox titled :
[x] Reset approvals on push

I know github doesn't have this feature (last time I checked), but bitbucket and gitlab do have it and can be very useful for larger teams with a lot of juniors.

On the technical side of things, I would imagine it being some sort of pre-commit hook that would check if there is a pull request, and on that pull request if there were approvals, and remove them if there were.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions