Skip to content

Commit

Permalink
Add support of creating PR with custom GH API token
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenali committed Mar 2, 2023
1 parent 868e594 commit c9d3862
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions github/backportPR.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ git push origin HEAD
if [ ${REVIEWERS:-} = "_OWNER_" ]; then
REVIEWERS=$PR_OWNER
fi
if [ ! -z ${GH_ACTOR_TOKEN:-} ]; then
export GH_TOKEN=${GH_ACTOR_TOKEN}
fi
gh pr create --repo $PR_CLONE_URL -f --reviewer "${REVIEWERS}" --assignee "${PR_OWNER}" --base "${TARGET_BASE_BRANCH}" --head ${BRANCH_NAME}
if [ "${AUTO_MERGE:-DEFAULT}" != "DEFAULT" ]; then
gh pr merge --auto --${AUTO_MERGE} --repo $PR_CLONE_URL
Expand Down

0 comments on commit c9d3862

Please sign in to comment.