Skip to content

Commit

Permalink
Fix existing status check
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Jul 10, 2024
1 parent 4fcce3c commit 8bc81a5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
status_state="pending"
if ${{ contains(github.event.*.labels.*.name, 'design-approved') }}; then
status_state="success"
elif ! curl -sSL --fail-with-body \
-X POST \
else
resp="$(curl -sSL --fail-with-body \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/${{ github.event.pull_request.head.sha }}/statuses" \
| jq -e '.[] | select(.context == "Design Approved Check")' > /dev/null
then
# Design not approved yet and no status exists
# Keep it without a status
exit 0
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/${{ github.event.pull_request.head.sha }}/statuses")"
if ! jq -e '.[] | select(.context == "Design Approved Check")' > /dev/null <<< "$resp"; then
# Design not approved yet and no status exists
# Keep it without a status
exit 0
fi
fi
curl -sSL --fail-with-body \
-X POST \
Expand Down

0 comments on commit 8bc81a5

Please sign in to comment.