Assigns PRs automatically using round robin strategy. Auto assign supports multiple teams, and it works taking a PR owner's name and searching through teams member list, once the team is determined the reviewers list is used to assign a reviewer, team's names are used as key because of that each one must be different, each team has its own reviewers queue.
To install auto-assign you need to follow the next steps.
- Go to GitHub Settings/Developer settings and create a new GitHub App.
- Set a name,Webhook URL and Webhook secret it must match with the environment variable WEBHOOK_SECRET.
- The next permissions are required:
- Single file path: .github/auto_assign.yml access: Read-only
- Pull request: Read and write
- Issues: Read and write
- Subscribe to:
- Issues
- Pull request
- Add an auto_assign.yml file into your repo, in the .github folder using the next structure.
- Install your GitHub App to your repository.
You can set a default list of assignees that will be applied when someone that is not a member of any team
creates a PR/Issue, In order to do that, you just need to create a team called default
. That team just need a list of assignees
just as in the following example.
teams:
- name: team_name_1
members:
- github_user_name_1
- github_user_name_2
assignees:
- github_user_name_1
- github_user_name_2
- name: team_name_2
members:
- github_user_name_3
- github_user_name_4
assignees:
- github_user_name_5
- name: default
assignees:
- github_user_name_1
- github_user_name_3
If you want to test something without affecting the queue order for your repo you can add a property scope: dev
to your auto_assign.yml
. This will force the app to use a memory queue instead of the database.
WARNING: Keep in mind that every PR and Issue that you create using this property will be really assign.