diff --git a/.github/workflows/notify-triage.yml b/.github/workflows/notify-triage.yml index 107a748..a90b6d3 100644 --- a/.github/workflows/notify-triage.yml +++ b/.github/workflows/notify-triage.yml @@ -13,13 +13,13 @@ permissions: jobs: notify: + # Exclude dependabot's dependency updates. That's just going to annoy people. + if: ${{ github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - name: Run workflow - # Exclude dependabot's dependency updates. That's just going to annoy people. - if: ${{ github.actor != 'dependabot[bot]' }} env: - GH_TOKEN_SECRET: ${{ github.token }} + GH_TOKEN: ${{ github.token }} run: | set -euo pipefail @@ -39,6 +39,5 @@ jobs: echo "cmd: $cmd" echo "id: $id" - export GITHUB_TOKEN="$GH_TOKEN_SECRET" gh $cmd edit --repo "$GITHUB_REPOSITORY" "$id" --add-project 'Triage/bugs' gh $cmd comment --repo "$GITHUB_REPOSITORY" "$id" --body '@MithrilJS/triage Please take a look.' diff --git a/.github/workflows/reject-pr.yml b/.github/workflows/reject-pr.yml index 30851a6..f116e48 100644 --- a/.github/workflows/reject-pr.yml +++ b/.github/workflows/reject-pr.yml @@ -18,10 +18,9 @@ jobs: echo "::error::This action must only be run on 'pull_request_target' events" exit 1 esac - export GITHUB_TOKEN="$GH_TOKEN_SECRET" gh pr close "$PR_URL" --comment "$MESSAGE" --reason 'not planned' && gh pr lock "$PR_URL" --reason 'resolved' env: - GITHUB_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ github.token }} PR_URL: ${{ github.event.pull_request.url }} MESSAGE: Hey @${{ github.actor }}, this pull request should be directed towards `${{ inputs.correct_branch }}`. Please file a new pull request targeting that branch instead.