Skip to content

Commit

Permalink
Quote mismatch fix (#1418)
Browse files Browse the repository at this point in the history
Recommended by ChatGPT because I got tired of trying to deal with quotes
  • Loading branch information
KartikP authored Oct 31, 2024
1 parent f96f1ee commit d456458
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/map_new_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
# Fetch the status of all checks for this commit
statuses=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/brain-score/vision/commits/${{ github.event.pull_request.head.sha }}/status" | jq -r '.statuses[] | {context: .context, state: .state}')
"https://api.github.com/repos/brain-score/vision/commits/${{ github.event.pull_request.head.sha }}/status")
echo "Statuses response from GitHub API:"
echo "$statuses" | jq '.'
echo "$statuses" | jq '.statuses[] | {context: .context, state: .state}'
# Loop through each required check and verify if it has succeeded
for check in "${required_checks[@]}"; do
if echo "$statuses" | grep -q "{\"context\":\"$check\",\"state\":\"success\"}"; then
if echo "$statuses" | jq -e --arg check "$check" '.statuses[] | select(.context == $check and .state == "success")' > /dev/null; then
echo "Job '$check' is successful."
((completed_checks+=1))
else
Expand Down

0 comments on commit d456458

Please sign in to comment.