From 0f64ba9e998b11cdf520e14ef81f9f8104dad412 Mon Sep 17 00:00:00 2001 From: Github Date: Sat, 2 Oct 2021 09:53:06 +0200 Subject: [PATCH] chore: reconfigure autoassign --- .github/auto_assign.yml | 12 +++++++++++ .github/workflows/auto-assign.yaml | 34 ++---------------------------- 2 files changed, 14 insertions(+), 32 deletions(-) create mode 100644 .github/auto_assign.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 0000000..0736651 --- /dev/null +++ b/.github/auto_assign.yml @@ -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 diff --git a/.github/workflows/auto-assign.yaml b/.github/workflows/auto-assign.yaml index 8b40f48..7ee14a0 100644 --- a/.github/workflows/auto-assign.yaml +++ b/.github/workflows/auto-assign.yaml @@ -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