Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Update functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Edaena Salinas authored and Edaena Salinas committed Apr 15, 2020
1 parent ce232d9 commit 8981c50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ function approve_pull_request () {
exit 1
fi
fi
real_title=$(echo $all_prs | jq -r --arg pr_title "$pr_title" 'select(.[].title | startswith($pr_title)) | .[].title' | head -n 1)
real_title=$(echo $all_prs | jq -r --arg pr_title "$pr_title" '.[] | select(.title | startswith($pr_title)) | .title' | head -n 1)
pull_request_id=$(echo $all_prs | jq -r --arg pr_title "$pr_title" 'select(.[0].title | startswith($pr_title)) | .[0].pullRequestId')
if [ "$pull_request_id" == "" ]; then
pull_request_id=$(echo $all_prs | jq -r --arg pr_title "$pr_title" 'select(.[].title | startswith($pr_title)) | .[0].pullRequestId')
pull_request_id=$(echo $all_prs | jq -r --arg pr_title "$pr_title" '.[] | select(.title | startswith($pr_title)) | .pullRequestId' | head -n 1)
fi
echo "Found pull request starting with phrase '$pr_title'"
echo "Pull request id $pull_request_id is '$real_title'"
Expand Down

0 comments on commit 8981c50

Please sign in to comment.