Skip to content

Commit

Permalink
chore: reconfigure autoassign
Browse files Browse the repository at this point in the history
  • Loading branch information
Github committed Oct 2, 2021
1 parent 4e0fc98 commit 0f64ba9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 32 deletions.
12 changes: 12 additions & 0 deletions .github/auto_assign.yml
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
34 changes: 2 additions & 32 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/auto-assign-action@v1.2.0

0 comments on commit 0f64ba9

Please sign in to comment.