Skip to content

ci: fix 'Commit new baselines' push on pull_request builds - #606

Merged
shikokuchuo merged 1 commit into
mainfrom
ci-fix-baseline-commit-pr-push
Aug 26, 2026
Merged

ci: fix 'Commit new baselines' push on pull_request builds#606
shikokuchuo merged 1 commit into
mainfrom
ci-fix-baseline-commit-pr-push

Conversation

@shikokuchuo

Copy link
Copy Markdown
Member

The Commit new baselines step in hub-client-e2e.yml ran plain git push, but PR builds check out a detached merge-commit HEAD, so the push fails with fatal: You are not currently on a branch (run 32953026576, on the hub-client-uiux-phase0 PR — the first to hit the missing-baseline path on a PR).

Fix: on PRs, fetch the PR head SHA (the default fetch-depth-1 checkout only has the merge commit), commit the generated baselines on top of it, and push to HEAD:refs/heads/<head_ref>. The gitignored snapshot PNGs survive the checkout. Push events on main keep the existing behavior.

Once this lands, the next phase-0 PR run will auto-commit the 16 missing linux visual baselines that the failed run generated.

The step ran plain `git push`, but PR builds check out a detached
merge-commit HEAD, so the push failed with 'not currently on a branch'
(run 32953026576, on the hub-client-uiux-phase0 PR — the first to hit
the missing-baseline path on a PR).

On PRs, fetch the PR head SHA (the default fetch-depth-1 checkout only
has the merge commit), commit the generated baselines on top of it, and
push to the head branch. The gitignored PNGs survive the checkout.
Push events (main) keep the existing behavior.
@posit-snyk-bot

posit-snyk-bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@shikokuchuo
shikokuchuo merged commit c11aa0e into main Aug 26, 2026
10 checks passed
@shikokuchuo
shikokuchuo deleted the ci-fix-baseline-commit-pr-push branch August 26, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants