Skip to content

Commit 2bcbe01

Browse files
committed
Fix all-good script
1 parent 02267b4 commit 2bcbe01

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/all-good.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ jobs:
9898
echo "All check runs passed!"
9999
exit 0
100100
else
101-
echo "Some check runs failed. Exiting with error."
101+
echo "The following check run(s) failed:"
102+
# Failed checks on the current commit
103+
echo "$commit_response" | jq -r '.check_runs[] | select(.conclusion != "success") | .name' | sed 's/^/ - /'
104+
# Failed checks on the PR head commit (if different)
105+
if [ -n "$PR_HEAD_SHA" ] && [ "$PR_HEAD_SHA" != "$COMMIT" ]; then
106+
echo "$pr_response" | jq -r '.check_runs[] | select(.conclusion != "success") | .name' | sed 's/^/ - /'
107+
fi
102108
exit 1
103109
fi
104110
done

0 commit comments

Comments
 (0)