Skip to content

Commit 9521f5e

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

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

entrypoint.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ 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
37-
pr_exists=$(git_cmd hub pr list | grep ${last_sha} | wc -l)
38-
39-
if [[ "${pr_exists}" -gt 0 ]]; then
40-
echo "PR Already exists!!!"
41-
git_cmd hub pr list | grep ${last_sha}
42-
exit 0
43-
fi
44-
4536
if [[ "${up_to_date}" -eq 0 ]]; then
4637
git_cmd git checkout -b "${pr_branch}" --track "upstream/${INPUT_UPSTREAM_BRANCH}"
4738
git_cmd git push -u origin "${pr_branch}"
4839
git_cmd git remote remove upstream
49-
git_cmd hub pull-request -b "${INPUT_BRANCH}" -h "${pr_branch}" -l "${INPUT_PR_LABELS}" -a "${GITHUB_ACTOR}" -m "\"Upstream: ${last_sha}\""
40+
41+
hub pr list
42+
pr_exists=$(git_cmd hub pr list | grep ${last_sha} | wc -l)
43+
44+
if [[ "${pr_exists}" -gt 0 ]]; then
45+
echo "PR Already exists!!!"
46+
exit 0
47+
else
48+
git_cmd hub pull-request -b "${INPUT_BRANCH}" -h "${pr_branch}" -l "${INPUT_PR_LABELS}" -a "${GITHUB_ACTOR}" -m "\"Upstream: ${last_sha}\""
49+
fi
5050
else
5151
echo "Branch up-to-date"
5252
exit 0

0 commit comments

Comments
 (0)