Skip to content

Commit f2fc524

Browse files
committed
fix log and set return code
fix pull request never created
1 parent 10c31a7 commit f2fc524

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

entrypoint.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ if [[ -s /tmp/changes.patch ]] ; then
4040
git push origin $patch_branch_name
4141

4242

43-
if [[ "$remote_branch_exists" ]]; then
43+
if [[ -z "$remote_branch_exists" ]]; then
4444
echo "INFO : create a pull request." ;
4545
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token "$TOKEN https://api.github.com/repos/$repository_name/pulls -d '{"head":"'$patch_branch_name'","base":"'$base_branch_name'", "title":"Fix yaml files"}'
4646
fi
4747
fi
48-
49-
echo "INFO : all input files either are skipped or successfully pass yamllint strict mode." ;
5048
exit 1
49+
else
50+
echo "INFO : all input files either are skipped or successfully pass yamllint strict mode." ;
51+
exit 0
5152
fi ;
52-
53-
exit $?

0 commit comments

Comments
 (0)