🤖 A Probot app that adds reviewers to pull requests when pull requests are opened.
A GitHub App built with Probot that adds reviewers/assignees to pull requests when pull requests are opened.
.github/auto_assign.ymlin your repository with the following.
Add reviewers/assignees to the pull request based on single reviewers list.
# Set to true to add reviewers to pull requests addReviewers: trueSet to true to add assignees to pull requests
addAssignees: false
A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
numberOfReviewers: 0
Add Github team to the pull request based on single reviewers list using the
org/team_slugor
/team_slugsyntax.
# Set to true to add reviewers to pull requests addReviewers: trueSet to true to add assignees to pull requests
addAssignees: false
A list of team reviewers to be added to pull requests (GitHub team slug)
reviewers:
numberOfReviewers: 0
Note: Number of reviewers has currently no impact on Github teams and all teams will be added as reviewers.
Add reviewers/assignees to the pull request based on multiple reviewers list.
If you and peers work at the separate office or they work at the separate team by roles like frontend and backend, you might be good to use adding reviewers from each group.
# Set to true to add reviewers to pull requests addReviewers: trueSet to true to add assignees to pull requests
addAssignees: false
A number of reviewers added to the pull request
Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 1
A number of assignees to add to the pull request
Set to 0 to add all of the assignees.
Uses numberOfReviewers if unset.
numberOfAssignees: 2
Set to true to add reviewers from different groups to pull requests
useReviewGroups: true
A list of reviewers, split into different groups, to be added to pull requests (GitHub user name)
reviewGroups: groupA: - reviewerA - reviewerB - reviewerC groupB: - reviewerD - reviewerE - reviewerF
Set to true to add assignees from different groups to pull requests
useAssigneeGroups: false
A list of assignees, split into different froups, to be added to pull requests (GitHub user name)
assigneeGroups:
groupA:
- assigneeA
- assigneeB
- assigneeC
groupB:
- assigneeD
- assigneeE
- assigneeF
A list of keywords to be skipped the process that add reviewers if pull requests include it
skipKeywords:
- wip
Add the PR creator as assignee to the pull request.
# Set to author to set pr creator as assignee addAssignees: author
If you want to add the same reviewers every time the pull request is opened, you can use code owners. Also, if you want to add randomly reviewers, you can use this app together.
About code owners - GitHub Help
# Install dependencies npm installRun typescript
npm run build
Run the bot
npm start
Test before submitting a PR
npm test
See Contributing for more information about making improvements to
auto-assign.
https://random-word.glitch.me/probot.
https://random-word.glitch.me/. Notice that we left off the
/probot.
.envfile.
.github/auto_assign.yml) for pull requests.
.data/private-key.pem. Then click Add File. Copy the contents of the private key you downloaded after creating the app, paste it into the new file in Glitch.
.envfile (at left) with your app credentials.
Livelabel should show up next to the Show button when it's finished loading.
# The ID of your GitHub App; You can find this in the About section of your Github app APP_ID=The Webhook Secret; This is generated by you and then inputted in the settings of your Github app.
WEBHOOK_SECRET=development
The path to a private key file; This is set by you and then set the contents of the private key you downloaded after creating the app.
PRIVATE_KEY_PATH=.data/private-key.pem
If you want to use the auto-assign app using GitHub Actions, refer to the following link. Also, because of providing the GitHub action for a new version (GitHub Actions v2; YAML format), the previous version (GitHub Actions v1; HCL format) is deprecated.
If you have suggestions for how
auto-assigncould be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
ISC © 2018 Kentaro Matsushita