go-gitea / gitea

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
https://gitea.com
MIT License
45.08k stars 5.49k forks source link

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

Closed akostin33 closed 3 months ago

akostin33 commented 4 years ago

Description

The same functionality as bitbucket has: https://confluence.atlassian.com/bitbucketserver/add-default-reviewers-to-pull-requests-834221295.html

stale[bot] commented 4 years ago

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 4 years ago

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

lakostin commented 4 years ago

How to re-open it?

kokarn commented 3 years ago

This would indeed be very handy

cp-logan commented 2 years ago

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.

ksa-real commented 1 year ago

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.

neszt commented 1 year ago

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

makar112233 commented 9 months ago

+1

promiteyka commented 9 months ago

+1 vote

amix307 commented 8 months ago

+1

delvh commented 8 months ago

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

lunny commented 8 months ago

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

ksa-real commented 8 months ago

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

lunny commented 8 months ago

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.

makar112233 commented 8 months ago

@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.

lunny commented 8 months ago

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

ksa-real commented 8 months ago

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

neszt commented 8 months ago

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!