Skip to content

fix(ci): stop clean-branches cron aborting on missing origin/HEAD#185

Merged
pofallon merged 1 commit into
mainfrom
fix/clean-branches-cron
Jun 8, 2026
Merged

fix(ci): stop clean-branches cron aborting on missing origin/HEAD#185
pofallon merged 1 commit into
mainfrom
fix/clean-branches-cron

Conversation

@pofallon

@pofallon pofallon commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

The `clean-branches` recipe runs under `set -euo pipefail`. The default-branch
detection assigned from `git symbolic-ref refs/remotes/origin/HEAD`, which fails
(quietly) in the Actions checkout where origin/HEAD isn't configured. Under
pipefail+errexit that failing pipeline aborted the whole recipe *before* the
intended fallback (`git remote show origin` -> `main`) could run, so the
scheduled job always exited non-zero.

Guard the assignment with `|| true` so the fallback chain runs. Also fix the
remote-branch filter `grep -E '^origin/.\+'` (matched a literal `+`, so it
silently matched nothing) to `'^origin/.+'`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pofallon pofallon merged commit ac79f80 into main Jun 8, 2026
6 checks passed
@pofallon pofallon deleted the fix/clean-branches-cron branch June 8, 2026 10:43
@github-actions github-actions Bot added the build Build system changes label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant