-
Notifications
You must be signed in to change notification settings - Fork 896
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
28 additions
and
19 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,4 @@ | ||
|
||
addReviewers: false | ||
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 |
---|---|---|
|
@@ -15,27 +15,32 @@ name: Assign PR to author and reviewers | |
types: [ opened, reopened, ready_for_review ] | ||
|
||
jobs: | ||
|
||
assign-pr: | ||
name: Assign PR to author | ||
permissions: | ||
contents: write | ||
# permissions: write-all | ||
# 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/[email protected] | ||
# - uses: kentaro-m/[email protected] | ||
- uses: delivery-much/actions-assigner@v1 | ||
with: | ||
token: ${{ secrets.ORG_AUTOMATION_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}" | ||
# 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}" |