Skip to content

Commit 97f65d9

Browse files
committed
ci: fail workflow visibly when issue creation fails
1 parent 6025363 commit 97f65d9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/sync-upstream-issues.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
ISSUES_FILE="${{ steps.fetch.outputs.issues_file }}"
7272
CREATED_COUNT=0
7373
SKIPPED_COUNT=0
74+
FAILED_COUNT=0
7475
7576
if [ ! -s "$ISSUES_FILE" ]; then
7677
echo "No issues to process"
@@ -122,7 +123,8 @@ jobs:
122123
echo "✓ Created issue for upstream #$UPSTREAM_NUM"
123124
echo "$CREATE_OUTPUT"
124125
} || {
125-
echo "⚠ Failed to create issue for upstream #$UPSTREAM_NUM"
126+
FAILED_COUNT=$((FAILED_COUNT + 1))
127+
echo "❌ Failed to create issue for upstream #$UPSTREAM_NUM"
126128
echo " gh error:"
127129
echo "$CREATE_OUTPUT"
128130
}
@@ -140,4 +142,12 @@ jobs:
140142
echo "Summary:"
141143
echo "- Created: $CREATED_COUNT new issues"
142144
echo "- Skipped: $SKIPPED_COUNT existing issues"
145+
echo "- Failed: $FAILED_COUNT issues"
143146
echo "- Total processed: ${{ steps.fetch.outputs.issue_count }}"
147+
148+
# Fail the workflow if any issues failed to create
149+
if [ "$FAILED_COUNT" -gt 0 ]; then
150+
echo ""
151+
echo "::error::Failed to create $FAILED_COUNT issue(s). Check logs above for details."
152+
exit 1
153+
fi

0 commit comments

Comments
 (0)