fix(coverage): skip cleanly when PR head branch was deleted by auto-merge#1
Closed
fredbi wants to merge 4 commits into
Closed
fix(coverage): skip cleanly when PR head branch was deleted by auto-merge#1fredbi wants to merge 4 commits into
fredbi wants to merge 4 commits into
Conversation
…identity (#203) Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…user, not a bot Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…mation Skills under .claude/skills/ are now versioned and shared publicly for this repo (unlike most others, where they stay user-local). This commit flips the ignore rule and seeds the directory with: - github-actions.md: general workflow patterns, repo architecture, bot-credentials / wait-pending-jobs recipes, TOCTOU race handling. - golang-monorepo.md: testing, linting, fuzz, and module layout for the ci-workflows / gh-actions split. - dependabot-automation.md (new): captures the hard-won lesson that Dependabot rejects all user.type == "Bot" identities (including GitHub App installation tokens), regardless of token permissions. Documents the dual bot-go-openapi identities (App vs. user account), the PAT-based identity swap used by monitor-bot-pr.yml, and the anti-patterns we tried first. CLAUDE.md updated to point at the new skill. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…erge The collect-coverage job is intentionally not a required check (codecov uploads are flaky), so auto-merge can fire before it runs. When that happens, GitHub's auto-delete-branch policy removes the PR head and the checkout step fails with a noisy "Reference not found" error, leaving a red status on an otherwise successful merge. Add a precheck step that queries the GitHub API for the head branch. If it's gone, emit a notice and gate the remaining steps off, so the job conclusion stays green. Normal PRs (branch still exists) are unaffected -- coverage is still uploaded and real failures still surface. collect-reports.yml does not need the same fix: it has no checkout step (downloads artifacts by run_id, uses head.sha as a literal value). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
collect-coveragejob is intentionally not a required check (codecov uploads are flaky). Auto-merge can therefore fire before it runs, and GitHub's auto-delete-branch policy removes the PR head — leaving the subsequentactions/checkoutto fail with a noisy "Reference not found" error and a red status on an already-merged PR.::noticeand gate the remaining steps off so the job conclusion stays green. Normal PRs (branch still present) are unaffected — coverage uploads as before, and real failures still surface.collect-reports.ymldoes not need the same fix: it has no checkout step (downloads artifacts byrun_id, useshead.shaas a literal value).Test plan
collect-coveragejob is green with a "skip-coverage" notice instead of red.collect-coveragerun on a PR whose branch was deleted post-merge — should now finish green.🤖 Generated with Claude Code