go-gitea/gitea

Permissions to accept/merge Pull request

webjoel opened this issue ยท 14 comments

  • Gitea version (or commit ref): 4d01eca
  • Git version: 2.7.4
  • Operating system: Linux Ubuntu 64
  • 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:

Description

The idea is to do something like gitlab and bitbucket, where only a few users or teams can approve the pull request, and can also configure the minimum number of approvers, for example here in the company, several developers will request the pull request request for the branch "develop" and some leaders will receive a notification, review the code and approve the pull request. Example Image 1.

In the case, one or more users may disapprove the pull request, if all approve according to the minimum number the pull request can be merged. Example image 2 and 3.

This type of permission must be configured by branch, and can be in the same place where branch protection is already configured. Example image 4.

Screenshots

Image Example 1:
approvals_settings

Image Example 2:
build_status_pr

Image Example 3:
captura de tela de 2017-10-27 11-38-03

Image Example 4:
captura de tela de 2017-10-27 10-52-24

@lafriks is working on something similar and can be merged into this issue:

"I'm working to add approval system (something like GitHub - request changes/approve) only it will be possible to define how many approvals are needed to be able to merge PR
And it will also be possible to define teams/users who can approve."

that's mean there should be a RBAC system first. it's not small feature

@webjoel @lafriks Will said approval system just be "approve"/"disapprove"?

@bkcsoft I'm working on approve/request changes system (something like we use LG-TM for now). Want to also integrate it with @lunny comments on code

@lafriks do you still work on this? is there any test branch available?

lunny commented

@jogibear9988 approve system is not ready but via #3689 you can indicate who can merge the pull request.

@jogibear9988 I'm but I'm waiting on @lunny to finish comments on PR code to be finished

Is there any chance to get this released in the near future? Protecting a branch from "unauthorized" PRs is a must have for us.

lunny commented

@PietYorke I think maybe #3689 could help you?

I think this is actually resolved by #3689 isn't it?

Yes, right. Thank you. We are using the gitea docker image, so it's on :latest. Would be nice to have it on a release version though.

@webjoel can this be closed as fixed?

@lafriks Yep! Can to close this. :)

Hi there, #3689 is a nice feature and it will protect a branch from "unauthorized" PRs.
The feature mentioned in this feature request, would be a nice addition/extension.

So for example add an additional line 'approvers', an checkbox to enable the feature, and a number input how many approves are required.

So it will be possible to restrict merges to at least an 4 eye principle...