Skip to content

Commit

Permalink
Improve debug log
Browse files Browse the repository at this point in the history
The two logs were consolidated into one, and the wording was improved.
Quotes were added around the variables to make it clearer in the case
where they are empty.
  • Loading branch information
Gudahtt committed Dec 18, 2024
1 parent 07f7857 commit d9c6677
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/wait-for-circleci-workflow-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
# HEAD commit hash is `pull_request.head.sha`.
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
echo "Looking for pipeline for commit ${HEAD_COMMIT_HASH}"
pipeline_id=$(curl --silent "https://circleci.com/api/v2/project/gh/$OWNER/$REPOSITORY/pipeline?branch=$BRANCH" | jq -r ".items | map(select(.vcs.revision == \"${HEAD_COMMIT_HASH}\" )) | first | .id")
echo "Found pipeline ID ${pipeline_id}"
echo "Waiting for pipeline '${pipeline_id}' for commit hash '${HEAD_COMMIT_HASH}'"
workflow_status=$(curl --silent "https://circleci.com/api/v2/pipeline/$pipeline_id/workflow" | jq -r ".items[0].status")
if [ "$workflow_status" == "running" ]; then
Expand Down

0 comments on commit d9c6677

Please sign in to comment.