Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
I have been trying to make use of the Code Owners feature where a CODEOWNERS file can be added to the repository and different users or teams can be assigned as code owners for different files/folders. However I have noticed that although it works fine and adds the appropriate code owners as defined in the CODEOWNERS file as reviewers when changes are made to those files, the reviews from those users/teams are not enforced.
If any other user with write access to the repository and not a code owner for that particular file approves the Pull request with the change it still counts as a valid approval. Similarly if there are whitelisted users on the branch and any whitelisted user approves the change, it still counts as valid approval even though the code owner for that particular file might not have approved. There is no option to "Require review from Code Owners" in the branch protection rules. Such feature exists in GitHub and Azure repos. Do you guys plan to add this capability to gitea as well ?
Without the ability to require approval from owners of changed file, the Code owners feature is not fully effective as any other users or users not part of team (if teams are reviewers) can also approve changes and it counts as valid review. If there is a code owner listed for a file, there should be an option to require the approval from the code owner.
Gitea Version
1.21.11
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
I am running Gitea instance in a container on Red Hat OpenShift platform.
Description
Hi
I have been trying to make use of the Code Owners feature where a CODEOWNERS file can be added to the repository and different users or teams can be assigned as code owners for different files/folders. However I have noticed that although it works fine and adds the appropriate code owners as defined in the CODEOWNERS file as reviewers when changes are made to those files, the reviews from those users/teams are not enforced.
If any other user with write access to the repository and not a code owner for that particular file approves the Pull request with the change it still counts as a valid approval. Similarly if there are whitelisted users on the branch and any whitelisted user approves the change, it still counts as valid approval even though the code owner for that particular file might not have approved. There is no option to "Require review from Code Owners" in the branch protection rules. Such feature exists in GitHub and Azure repos. Do you guys plan to add this capability to gitea as well ?
Without the ability to require approval from owners of changed file, the Code owners feature is not fully effective as any other users or users not part of team (if teams are reviewers) can also approve changes and it counts as valid review. If there is a code owner listed for a file, there should be an option to require the approval from the code owner.
Gitea Version
1.21.11
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
I am running Gitea instance in a container on Red Hat OpenShift platform.
Database
None