File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ parameters:
2222 description : >
2323 Specify the hostname of the GitHub instance to authenticate with.
2424 Set this to connect to your GitHub Enterprise instance.
25+ repo :
26+ type : string
27+ default : " $CIRCLE_REPOSITORY_URL"
28+ description : Enter either the name of the repository or the full repository URL. Will default to the current project.
2529 token :
2630 type : env_var_name
2731 default : " GITHUB_TOKEN"
@@ -36,12 +40,12 @@ parameters:
3640steps :
3741 - install :
3842 version : <<parameters.version>>
39- - clone
4043 - run :
4144 name : " Merging PR to target branch"
4245 environment :
4346 ORB_EVAL_ADDITIONAL_ARGS : <<parameters.additional_args>>
4447 ORB_EVAL_BRANCH : <<parameters.branch>>
4548 ORB_EVAL_HOSTNAME : <<parameters.hostname>>
49+ ORB_EVAL_REPO : <<parameters.repo>>
4650 ORB_ENV_TOKEN : <<parameters.token>>
4751 command : <<include(scripts/pr-merge.sh)>>
Original file line number Diff line number Diff line change 22branch=" $( eval printf ' %s' " $ORB_EVAL_BRANCH " ) "
33additional_args=" $( eval printf ' %s\\n' " $ORB_EVAL_ADDITIONAL_ARGS " ) "
44hostname=" $( eval printf ' %s' " $ORB_EVAL_HOSTNAME " ) "
5+ repo=" $( eval printf ' %s' " $ORB_EVAL_REPO " ) "
56token=" ${! ORB_ENV_TOKEN} "
67
78[ -z " $token " ] && {
@@ -10,10 +11,11 @@ token="${!ORB_ENV_TOKEN}"
1011}
1112printf ' %s\n' " export GITHUB_TOKEN=$token " >> " $BASH_ENV "
1213[ -n " $hostname " ] && printf ' %s\n' " export GITHUB_HOSTNAME=$hostname " >> " $BASH_ENV "
14+ [ -n " $repo " ] && repo=" -R $repo "
1315
1416set -x
1517# shellcheck disable=SC2086
1618gh pr merge \
17- $branch --repo " $( git config --get remote.origin.url ) " \
19+ $branch $repo \
1820 $additional_args
1921set +x
You can’t perform that action at this time.
0 commit comments