Skip to content

Commit

Permalink
fix: pull request existence condition (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Sep 12, 2023
1 parent ce5235f commit 6a189cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ create_pull_request() {
PULL_REQUESTS=$(echo "$(curl -sSL -H "${AUTH_HEADER}" -H "${HEADER}" -X GET "${PULLS_URL}${PULL_REQUESTS_QUERY_PARAMS}")" | jq --raw-output '.[] | .head.ref ')

# check if pull request exist
if echo "$PULL_REQUESTS " | grep -q "$BRANCH "; then
if echo "$PULL_REQUESTS" | grep -xq "$BRANCH"; then
echo "PULL REQUEST ALREADY EXIST"
else
echo "CREATE PULL REQUEST"
Expand Down

0 comments on commit 6a189cf

Please sign in to comment.