-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dedicated token for pr assignment
Since changing the default permissions of the GITHUB_TOKEN this workflow was failing with insufficient permissions.
- Loading branch information
Showing
2 changed files
with
29 additions
and
20 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,6 @@ | ||
|
||
addReviewers: false | ||
|
||
# Set to true to add assignees to pull requests | ||
addAssignees: author | ||
|
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 |
---|---|---|
|
@@ -11,31 +11,34 @@ name: Assign PR to author and reviewers | |
# committed code should _NOT_ be touched in any case. | ||
|
||
"on": | ||
pull_request_target: | ||
types: [ opened, reopened, ready_for_review ] | ||
pull_request: | ||
# pull_request_target: | ||
# types: [ opened, reopened, ready_for_review ] | ||
|
||
jobs: | ||
|
||
assign-pr: | ||
name: Assign PR to author | ||
permissions: | ||
contents: write | ||
contents: read # for kentaro-m/auto-assign-action to fetch config file | ||
pull-requests: write # for kentaro-m/auto-assign-action to assign PR reviewers | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: toshimaru/auto-author-assign@v2.1.0 | ||
- uses: kentaro-m/auto-assign[email protected] | ||
|
||
ask-review: | ||
name: Run pull-review | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.pull_request.draft }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run pull-review with docker | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OWNER: ${{ github.repository_owner }} | ||
REPO: ${{ github.event.repository.name }} | ||
PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} | ||
shell: bash | ||
run: | | ||
PR_URL="https://github.com/${OWNER}/${REPO}/pull/${PULL_REQUEST_NUMBER}" | ||
docker run ghcr.io/imsky/pull-review "$PR_URL" --github-token "${GITHUB_TOKEN}" | ||
# ask-review: | ||
# name: Run pull-review | ||
# runs-on: ubuntu-latest | ||
# if: ${{ !github.event.pull_request.draft }} | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Run pull-review with docker | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# OWNER: ${{ github.repository_owner }} | ||
# REPO: ${{ github.event.repository.name }} | ||
# PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} | ||
# shell: bash | ||
# run: | | ||
# PR_URL="https://github.com/${OWNER}/${REPO}/pull/${PULL_REQUEST_NUMBER}" | ||
# docker run ghcr.io/imsky/pull-review "$PR_URL" --github-token "${GITHUB_TOKEN}" |