Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dedicated token for pr assignment #6868

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

addReviewers: false
addAssignees: author

43 changes: 24 additions & 19 deletions .github/workflows/pr-handling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/auto-author-assign@v2.1.0
# - uses: kentaro-m/auto-assign-action@v2.0.0
- 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}"
Loading