Skip to content

Commit a5c5d4b

Browse files
pRizzclaude
andcommitted
ci: ensure labels exist before creating issue on CI failure
The "Create issue on CI failure" step was failing because the "automated" label didn't exist in the repo. Add idempotent gh label create calls before gh issue create. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2119b73 commit a5c5d4b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/update-opencode-commit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ jobs:
235235
SUBMODULE_BRANCH: ${{ steps.update.outputs.submodule_branch }}
236236
run: |
237237
set -euo pipefail
238+
239+
# Ensure required labels exist (--force is a no-op if label already exists)
240+
gh label create "bug" --description "Something isn't working" --color "d73a4a" --force || true
241+
gh label create "automated" --description "Created by automation" --color "0e8a16" --force || true
242+
238243
run_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
239244
commit_short="${LATEST_COMMIT:0:12}"
240245
commit_url="${SUBMODULE_REPO_URL:-}/commit/${LATEST_COMMIT:-unknown}"

0 commit comments

Comments
 (0)