Skip to content

Commit 4137a5e

Browse files
fix(impl-merge): clean up stale impl:LIB:failed label on successful merge
When impl-generate.yml fails (e.g. environment setup error) it tags the parent issue with `impl:LIB:failed`. A subsequent successful retry merges through impl-merge.yml, which previously only removed `impl:LIB:pending` and added `impl:LIB:done` — leaving the stale `:failed` label in place. Observed on #3802 (skewt-logp-atmospheric/makie): first generate failed on Project.toml setup (added :failed), retry succeeded after PR #7614 (added :done), and the issue closed with both labels for the same lib. The close-check counts in this same workflow use if/elif (done wins over failed) so totals weren't actually broken — but the labels were a lie. Other readers (DB sync, UI, future workflows) could trust them less charitably, so remove the stale label at the canonical merge point.
1 parent e4a69c6 commit 4137a5e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/impl-merge.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,14 @@ jobs:
292292
# Create labels if they don't exist
293293
gh label create "impl:${LIBRARY}:done" --color "0e8a16" --description "${LIBRARY} implementation merged" 2>/dev/null || true
294294
295-
# Remove trigger and pending, add done
295+
# Remove trigger, pending, and any stale failed label from earlier attempts,
296+
# then add done. The :failed label is added by impl-generate.yml when an
297+
# attempt errors out (e.g. environment setup failure); a later successful
298+
# retry merges via this workflow but historically didn't clean up :failed,
299+
# leaving the issue with both :done and :failed for the same library.
296300
gh issue edit "$ISSUE" --remove-label "generate:${LIBRARY}" 2>/dev/null || true
297301
gh issue edit "$ISSUE" --remove-label "impl:${LIBRARY}:pending" 2>/dev/null || true
302+
gh issue edit "$ISSUE" --remove-label "impl:${LIBRARY}:failed" 2>/dev/null || true
298303
gh issue edit "$ISSUE" --add-label "impl:${LIBRARY}:done"
299304
300305
- name: Post success to issue

0 commit comments

Comments
 (0)