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 GITHUB_TOKEN when repo_token is empty on PRs #335

Merged
merged 23 commits into from
Jun 27, 2022
Merged
Prev Previous commit
Next Next commit
test
laurentsimon committed Jun 27, 2022
commit b087e9152b0ee834fe738401a4edf2e8f32b119c
10 changes: 6 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -37,10 +37,10 @@ inputs:
required: false
default: false

internal_default_token:
description: "INPUT: Default GitHub token. (Internal purpose only, not intended for developers to set. Used for pull requests configured with a PAT)."
required: false
default: ${{ github.token }}
# internal_default_token:
# description: "INPUT: Default GitHub token. (Internal purpose only, not intended for developers to set. Used for pull requests configured with a PAT)."
# required: false
# default: ${{ github.token }}

branding:
icon: "mic"
@@ -49,5 +49,7 @@ branding:
runs:
using: "docker"
image: "./Dockerfile"
env:
INTERNAL_DEFAULT_TOKEN: ${{ github.token }}


2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ set -euo pipefail
# GITHUB_ACTIONS is true in GitHub env.

if [[ -z "$INPUT_REPO_TOKEN" ]]; then
INPUT_REPO_TOKEN="$INPUT_INTERNAL_DEFAULT_TOKEN"
INPUT_REPO_TOKEN="$INTERNAL_DEFAULT_TOKEN"
if [[ -z "$INPUT_REPO_TOKEN" ]]; then
exit 2
fi