kentaro-m/auto-assign
์๊ฐ
๐ค A Probot app that adds reviewers to pull requests when pull requests are opened.
๊ธฐํ ํ๋ก์ ํธ์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- ๊ธฐ๋ก ์์ง ์ค
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
OriginalProbot: Auto Assign
A GitHub App built with Probot that adds reviewers/assignees to pull requests when pull requests are opened.

How it works
- When the pull request is opened, automatically add reviewers/assignees to the pull request.
- If the number of reviewers is specified, randomly add reviewers/assignees to the pull request.
- If reviewers/assignees are separated into groups in the config file, randomly select the number of reviewers from each group.
- If the title of the pull request contains a specific keyword, do not add reviewers/assignees to the pull request.
Usage
- Deploy your own instance of the app (see Deploy) and install it on your repositories.
- Create
.github/auto_assign.ymlin your repository with the following.
Single Reviewers List
Add reviewers/assignees to the pull request based on single reviewers list.
# Set to true to add reviewers to pull requests
addReviewers: true
# Set to true to add assignees to pull requests
addAssignees: false
# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- reviewerA
- reviewerB
- reviewerC
# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
# assignees:
# - assigneeA
# 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
# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip
# A list of users to be skipped by both the add reviewers and add assignees processes
# skipUsers:
# - dependabot[bot]
Add Github Team to Single Reviewers List
Add Github team to the pull request based on single reviewers list using the org/team_slug or /team_slug syntax.
# Set to true to add reviewers to pull requests
addReviewers: true
# Set 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:
- org/teamReviewerA
- org/teamReviewerB
- /teamReviewerC
# Number of reviewers has no impact on Github teams
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
# assignees:
# - assigneeA
# 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
# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip
Note: Number of reviewers has currently no impact on Github teams and all teams will be added as reviewers.
Multiple Reviewers List
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: true
# Set 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
Assign Author as Assignee
Add the PR creator as assignee to the pull request.
# Set to author to set pr creator as assignee
addAssignees: author
Advantage
Use Auto Assign in combination with code owners
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
Development
# Install dependencies
npm install
# Run 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.
Deploy
Auto Assign is a Probot app. Follow Probot's deployment guide to register a GitHub App and deploy it: https://probot.github.io/docs/deployment/
GitHub App settings
When registering the GitHub App, configure the following:
- Repository permissions
- Pull requests: Read and write
- Metadata: Read-only
- Single file: Read-only (
.github/auto_assign.yml)
- Subscribe to events
- Pull request
To add GitHub teams as reviewers (org/team_slug), also grant:
- Repository permissions
- Administration: Read-only
- Organization permissions
- Members: Read-only
GitHub Actions
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.
Contributing
If you have suggestions for how auto-assign could 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.
License
ISC ยฉ 2018 Kentaro Matsushita
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ