Skip to content

Commit 5058583

Browse files
committed
corrected query fields
1 parent 7d92af7 commit 5058583

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/pr-supervisor.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ jobs:
4949
5050
# --- Get PR Checks using GitHub CLI ---
5151
# This command gets all checks for the current PR in JSON format
52-
checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state,conclusion)
52+
checks_json=$(gh pr checks ${{ github.event.pull_request.number }} --json name,state)
5353
5454
# --- Find our specific check using jq ---
5555
check_status=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .state")
56-
check_conclusion=$(echo "$checks_json" | jq -r ".[] | select(.name == \"$CHECK_NAME\") | .conclusion")
5756
5857
# --- Main Logic ---
5958
if [ -z "$check_status" ]; then
@@ -70,11 +69,11 @@ jobs:
7069
echo "Check '$CHECK_NAME' is currently '$check_status'. Waiting..."
7170
elif [ "$check_status" == "completed" ]; then
7271
# Case 3: The check has finished.
73-
if [ "$check_conclusion" == "success" ]; then
72+
if [ "$check_status" == "success" ]; then
7473
echo "Check '$CHECK_NAME' completed with conclusion: 'success'. Great!"
7574
exit 0
7675
else
77-
echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_conclusion'."
76+
echo "::error::Check '$CHECK_NAME' completed with conclusion: '$check_status'."
7877
exit 1
7978
fi
8079
else

0 commit comments

Comments
 (0)