-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Github
committed
Oct 2, 2021
1 parent
4e0fc98
commit 0f64ba9
Showing
2 changed files
with
14 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# 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: | ||
- pedrotroller | ||
|
||
numberOfReviewers: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,39 +3,9 @@ name: autoassign | |
|
||
on: | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
- edited | ||
- ready_for_review | ||
- reopened | ||
- unlocked | ||
types: [opened, ready_for_review] | ||
|
||
jobs: | ||
autoassign: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v2 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
if (context.payload.pull_request.draft) { | ||
console.log('Pull request is on draft. Skipped.'); | ||
return; | ||
} | ||
if (context.payload.sender.login.toLowerCase() == "pedrotroller") { | ||
console.log('Pull request created by the owner. Skipped.'); | ||
return; | ||
} | ||
let reviewers = ["pedrotroller"]; | ||
await github.pulls.requestReviewers({ | ||
pull_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
reviewers: reviewers | ||
}); | ||
- uses: kentaro-m/[email protected] |