File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -33,20 +33,20 @@ echo "Last commited SHA: ${last_sha}"
3333up_to_date=$( git_cmd git rev-list origin/${INPUT_BRANCH} | grep ${last_sha} | wc -l)
3434pr_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-
4536if [[ " ${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
5050else
5151 echo " Branch up-to-date"
5252 exit 0
You can’t perform that action at this time.
0 commit comments