Skip to content

Commit ff1c8fa

Browse files
fix: handle blocked mergeable_state
Include 'blocked' as valid mergeable_state for processing. Also check mergeable_state != 'dirty' in validation. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1 parent c8a8773 commit ff1c8fa

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/inbox-steward.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ jobs:
9393
9494
# Filter PRs that:
9595
# 1. Are not draft
96-
# 2. Have mergeable_state == "clean" or "has_hooks"
96+
# 2. Have mergeable_state == "clean", "has_hooks", or "blocked"
9797
# 3. Have all required checks passed
9898
PROCESSABLE_PRs=$(echo "$PRS_JSON" | jq '[.
9999
[] | select(
100100
.draft == false and
101-
(.mergeable_state == "clean" or .mergeable_state == "has_hooks")
101+
(.mergeable_state == "clean" or .mergeable_state == "has_hooks" or .mergeable_state == "blocked")
102102
)
103103
]')
104104
@@ -138,7 +138,9 @@ jobs:
138138
echo "PR #$PR_NUM: $PASSED/$TOTAL_REQUIRED passed, $FAILED failed"
139139
140140
# PR passes if all required checks passed
141-
if [ "$FAILED" -eq 0 ] && [ "$TOTAL_REQUIRED" -gt 0 ]; then
141+
# Check if PR mergeable state allows merging
142+
PR_MERGEABLE=$(echo "$PR" | jq -r '.mergeable_state // "unknown"')
143+
if [ "$FAILED" -eq 0 ] && [ "$TOTAL_REQUIRED" -gt 0 ] && [ "$PR_MERGEABLE" != "dirty" ]; then
142144
FINAL_PRs=$(echo "$FINAL_PRs" | jq --argjson pr "$PR" '. + [$pr]')
143145
COUNT=$((COUNT + 1))
144146
fi

0 commit comments

Comments
 (0)