Skip to content

Commit

Permalink
Check HTTP status of gh api curls
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Jul 10, 2024
1 parent 4d6d3a7 commit 0e537c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/trigger-merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Run merge-checks workflow
if: ${{ contains(github.event.*.labels.*.name, 'design-approved') }}
run: |
curl -L \
curl -sSL --fail-with-body \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
Expand All @@ -23,15 +23,15 @@ jobs:
- name: Update merge-checks workflow run
if: ${{ !contains(github.event.*.labels.*.name, 'design-approved') }}
run: |
if curl -L \
if curl -sSL --fail-with-body \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs \
| jq -e '.check_runs.[] | select(.name == "Design Approved Check")' >/dev/null
then
# The "design approved" check has previously run on this commit, so we need to reexecute it
curl -L \
curl -sSL --fail-with-body \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
Expand Down

0 comments on commit 0e537c7

Please sign in to comment.