Skip to content

Commit ad12d7e

Browse files
committed
add token parameter to action to allow use of PAT
1 parent 075ae68 commit ad12d7e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

action.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ inputs:
2626
description: reviewers required for all PRs
2727
required: false
2828
default: ""
29+
token:
30+
description: GitHub token for creating PRs (defaults to github.token)
31+
required: false
32+
default: ""
2933

3034
runs:
3135
using: composite
@@ -71,7 +75,7 @@ runs:
7175
# get list of reviewers for PR
7276
- run: |
7377
echo "REVIEWERS=$( \
74-
GITHUB_TOKEN=${{ github.token }} \
78+
GITHUB_TOKEN=${{ inputs.token || github.token }} \
7579
python $GITHUB_ACTION_PATH/deploy_bot/get_reviewers.py \
7680
--repository ${{ github.repository }} \
7781
--head-branch=${{ env.DEPLOYMENT_BRANCH }} \
@@ -91,4 +95,4 @@ runs:
9195
pr_label: ${{ inputs.pr_label }}
9296
pr_allow_empty: false
9397
pr_reviewer: ${{ env.REVIEWERS }}
94-
github_token: ${{ github.token }}
98+
github_token: ${{ inputs.token || github.token }}

0 commit comments

Comments
 (0)