Add the ability to set default reviewers per project for new pull requests #5395

Closed
opened 2025-11-02 06:23:29 -06:00 by GiteaMirror · 18 comments
Owner

Originally created by @akostin33 on GitHub (May 13, 2020).

  • Gitea version (or commit ref):
  • Git version:
  • Operating system:
  • 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 same functionality as bitbucket has:
https://confluence.atlassian.com/bitbucketserver/add-default-reviewers-to-pull-requests-834221295.html

Originally created by @akostin33 on GitHub (May 13, 2020). - Gitea version (or commit ref): - Git version: - Operating system: - Database (use `[x]`): - [x] PostgreSQL - [x] MySQL - [x] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description The same functionality as bitbucket has: https://confluence.atlassian.com/bitbucketserver/add-default-reviewers-to-pull-requests-834221295.html
GiteaMirror added the issue/confirmedtype/docs labels 2025-11-02 06:23:29 -06:00
Author
Owner

@stale[bot] commented on GitHub (Jul 12, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jul 12, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Jul 26, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Jul 26, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@lakostin commented on GitHub (Jul 26, 2020):

How to re-open it?

@lakostin commented on GitHub (Jul 26, 2020): How to re-open it?
Author
Owner

@kokarn commented on GitHub (Jun 10, 2021):

This would indeed be very handy

@kokarn commented on GitHub (Jun 10, 2021): This would indeed be very handy
Author
Owner

@cp-logan commented on GitHub (Jul 26, 2022):

Has there been any progress on this in the last year? We're trying to migrate off of BitBucket Cloud, and this is the only feature that's a blocker for my team.

@cp-logan commented on GitHub (Jul 26, 2022): Has there been any progress on this in the last year? We're trying to migrate off of BitBucket Cloud, and this is the only feature that's a blocker for my team.
Author
Owner

@ksa-real commented on GitHub (Nov 26, 2022):

Can this be implemented via hooks? I feel the webhooks mechanism should be expanded allowing synchronous responses for UI integration. I.e. Gitea could call webhook and get back a list of reviewers (team/users) which are instantly displayed in Gitea UI and look like a native Gitea feature. This would allow a more advanced use cases like load-balancing the reviewers, OWNERS files parsing, or "Smart AI" reviewers selection.

@ksa-real commented on GitHub (Nov 26, 2022): Can this be implemented via hooks? I feel the webhooks mechanism should be expanded allowing synchronous responses for UI integration. I.e. Gitea could call webhook and get back a list of reviewers (team/users) which are instantly displayed in Gitea UI and look like a native Gitea feature. This would allow a more advanced use cases like load-balancing the reviewers, OWNERS files parsing, or "Smart AI" reviewers selection.
Author
Owner

@neszt commented on GitHub (Apr 18, 2023):

+1 vote, it would be a very nice feature!

@neszt commented on GitHub (Apr 18, 2023): +1 vote, it would be a very nice feature!
Author
Owner

@makar112233 commented on GitHub (Feb 12, 2024):

+1

@makar112233 commented on GitHub (Feb 12, 2024): +1
Author
Owner

@promiteyka commented on GitHub (Feb 12, 2024):

+1 vote

@promiteyka commented on GitHub (Feb 12, 2024): +1 vote
Author
Owner

@amix307 commented on GitHub (Feb 28, 2024):

+1

@amix307 commented on GitHub (Feb 28, 2024): +1
Author
Owner

@delvh commented on GitHub (Feb 28, 2024):

Doesn't this already exist now that CODEOWNERS have been added?

@delvh commented on GitHub (Feb 28, 2024): Doesn't this already exist now that `CODEOWNERS` have been added?
Author
Owner

@lunny commented on GitHub (Feb 29, 2024):

Doesn't this already exist now that CODEOWNERS have been added?

Yes, I think this could be closed. https://docs.gitea.com/usage/code-owners

@lunny commented on GitHub (Feb 29, 2024): > Doesn't this already exist now that `CODEOWNERS` have been added? Yes, I think this could be closed. https://docs.gitea.com/usage/code-owners
Author
Owner

@ksa-real commented on GitHub (Feb 29, 2024):

Is there any documentation on how CODEOWNERS file affects pull requests?

@ksa-real commented on GitHub (Feb 29, 2024): Is there any documentation on how CODEOWNERS file affects pull requests?
Author
Owner

@lunny commented on GitHub (Feb 29, 2024):

Once the pull request's changed files matched the code owners' regex rules, the users will be set as reviewers when creating the pull request. A documentation is preferred.

@lunny commented on GitHub (Feb 29, 2024): Once the pull request's changed files matched the code owners' regex rules, the users will be set as reviewers when creating the pull request. A documentation is preferred.
Author
Owner

@makar112233 commented on GitHub (Feb 29, 2024):

@lunny could you give, please, an example of .CODEOWNERS file with the rule "check any code changes"?
I'm an BitBucket guy and don't know anything about this feature.

@makar112233 commented on GitHub (Feb 29, 2024): @lunny could you give, please, an example of .CODEOWNERS file with the rule "check any code changes"? I'm an BitBucket guy and don't know anything about this feature.
Author
Owner

@lunny commented on GitHub (Feb 29, 2024):

https://gitea.com/lunny/codeowner-example/src/branch/main/.gitea/CODEOWNERS and you can also send a PR as a test.

@lunny commented on GitHub (Feb 29, 2024): https://gitea.com/lunny/codeowner-example/src/branch/main/.gitea/CODEOWNERS and you can also send a PR as a test.
Author
Owner

@ksa-real commented on GitHub (Feb 29, 2024):

I guess it just follows whatever Github's CODEOWNERS file is doing:
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

For format we can look into ParseCodeOwnersLine function at the moment

@ksa-real commented on GitHub (Feb 29, 2024): I guess it just follows whatever Github's CODEOWNERS file is doing: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners For format we can look into ParseCodeOwnersLine function at the moment
Author
Owner

@neszt commented on GitHub (Feb 29, 2024):

https://gitea.com/lunny/codeowner-example/src/branch/main/.gitea/CODEOWNERS and you can also send a PR as a test.

I tried with *.* @user as in your example and with .* @user as in the documentation (regexp), neither of them worked (gitea version 1.20.3).

In your lunny/codeowner-example repo, I can't create a PR or create a branch.

edit: sorry, now I see it's a 1.21 new feature, I tested it again, it works fine!

@neszt commented on GitHub (Feb 29, 2024): > https://gitea.com/lunny/codeowner-example/src/branch/main/.gitea/CODEOWNERS and you can also send a PR as a test. I tried with `*.* @user` as in your example and with `.* @user` as in the documentation (regexp), neither of them worked (gitea version 1.20.3). In your `lunny/codeowner-example` repo, I can't create a PR or create a branch. edit: sorry, now I see it's a 1.21 new feature, I tested it again, it works fine!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5395