Skip to content

Commit

Permalink
fix log and set return code
Browse files Browse the repository at this point in the history
fix pull request never created
  • Loading branch information
mbarre committed Apr 28, 2022
1 parent 10c31a7 commit f2fc524
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ if [[ -s /tmp/changes.patch ]] ; then
git push origin $patch_branch_name


if [[ "$remote_branch_exists" ]]; then
if [[ -z "$remote_branch_exists" ]]; then
echo "INFO : create a pull request." ;
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"}'
fi
fi

echo "INFO : all input files either are skipped or successfully pass yamllint strict mode." ;
exit 1
else
echo "INFO : all input files either are skipped or successfully pass yamllint strict mode." ;
exit 0
fi ;

exit $?

0 comments on commit f2fc524

Please sign in to comment.