Skip to content

Commit 0dbf1b3

Browse files
committed
Update entrypoint.sh
1 parent ba0c5ac commit 0dbf1b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ echo "Last commited SHA: ${last_sha}"
3333
up_to_date=$(git_cmd git rev-list origin/${INPUT_BRANCH} | grep ${last_sha} | wc -l)
3434
pr_branch="up-${last_sha}"
3535

36+
hub pr list
3637
pr_exists=$(git_cmd hub pr list | grep ${last_sha} | wc -l)
38+
3739
if [[ "${pr_exists}" -gt 0 ]]; then
3840
echo "PR Already exists!!!"
3941
git_cmd hub pr list | grep ${last_sha}
@@ -43,6 +45,7 @@ fi
4345
if [[ "${up_to_date}" -eq 0 ]]; then
4446
git_cmd git checkout -b "${pr_branch}" --track "upstream/${INPUT_UPSTREAM_BRANCH}"
4547
git_cmd git push -u origin "${pr_branch}"
48+
git_cmd git remote remove upstream
4649
git_cmd hub pull-request -b "${INPUT_BRANCH}" -h "${pr_branch}" -l "${INPUT_PR_LABELS}" -a "${GITHUB_ACTOR}" -m "\"Upstream: ${last_sha}\""
4750
else
4851
echo "Branch up-to-date"

0 commit comments

Comments
 (0)