Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Explore auto-assigning PR-Team to reviews #387

Open
coreyshuman opened this issue Mar 30, 2023 · 4 comments
Open

[Feat]: Explore auto-assigning PR-Team to reviews #387

coreyshuman opened this issue Mar 30, 2023 · 4 comments
Assignees
Labels

Comments

@coreyshuman
Copy link
Member

Is your feature request related to a problem? Please describe.

Our current process is to manually attach the PR-Team to a PR review. It would be nice to automate this process. Furthermore, it is an error-prone process in that you must assign PR-Team before any other individuals who are in the team, otherwise the built-in GH auto assignment doesn't fire as expected.

Describe the solution you'd like.

A GH action may be useful here. A good example can be found here: https://github.com/rowi1de/auto-assign-review-teams
It will be interesting to test how quickly and efficiently this kind of option would work.

Describe alternatives you've considered

DevOps has investigated various options here: https://github.com/Shift3/terraform-modules/issues/208

Additional context

No response

@coreyshuman coreyshuman self-assigned this Mar 30, 2023
@Karvel
Copy link
Contributor

Karvel commented Mar 31, 2023

We've been using https://docs.gitstream.cm/ at my job, and it seems mostly useful. It can auto-assign PRs based on a yaml config. It is case sensitive, which we found out the hard way. 🙃 Github also supports subteams now and gitstream understands those also.

It can do other things like automatically apply labels and try to parse PR complexity to provide review estimate times. I find the time estimates less useful simply because they are more subjective.

We haven't tried automating reviews with it.

@michaelachrisco
Copy link
Contributor

michaelachrisco commented Mar 31, 2023

We discussed this earlier but just letting anyone else that comes into this know.

For specific/smaller teams, the CODEOWNER file works well. You can assign a team like so:
https://github.com/Shift3/terraform-modules/blob/develop/.github/CODEOWNERS
* @mwallert @Shift3/bwtc-devops

and GH will auto-assign the team on the CODEOWNERs file. This works for small teams like DevOps or our Pods. This does NOT work for our PR-Team as this gives people elevated permissions on a repo above simply auto-assigning the team to a PR.

Trying out all the combos now. Gitstream looks promising @Karvel

@michaelachrisco
Copy link
Contributor

michaelachrisco commented Apr 1, 2023

Got limited functionality within the CODEOWNER file by limiting both the branches it applies to as well as made specific files/patterns attached to each team. Examples were made here: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

There are some caravits to using such a method, each team must have write capability, you mush have different CODEOWNERS file per branch you wish to have it apply to, and you must dial in settings on each teams "Code review" settings.

Examples can be seen here: https://github.com/Shift3/Test-Auto-Assign-PR-Team/blob/main/.github/CODEOWNERS
In this example, one can see that our terraform files will auto-assign the DevOps Team. I will be added to all reviews (except my own) as the top most account. And PR-Team is always assigned if no one else is asigned or there is spots left over.

Shift3/Test-Auto-Assign-PR-Team#23 (auto assigned PR Team as default).

@michaelachrisco
Copy link
Contributor

michaelachrisco commented Apr 1, 2023

https://docs.gitstream.cm/examples/ looks promising. Thanks @Karvel !

@mwallert Id like us to try this out sometime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants