Skip to content

Fall back to the default branch screenshot baseline for stacked PRs - #118

Merged
float3 merged 1 commit into
mainfrom
fix-screenshot-baseline
Nov 4, 2026
Merged

float3 merged 1 commit into
mainfrom
fix-screenshot-baseline

Conversation

@float3

@float3 float3 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Screenshot compare on #111 fails with no matching workflow run found with any artifacts? because #111 targets move-fork-test-assertions, not main. The compare job downloads the baseline filtered on the PR base branch, and Store Baseline only publishes for main/dependency-updates, so the baseline run 41782987785 on main was never a candidate.

The "Pick the baseline workflow" step now chooses the branch as well: the PR base branch if it has a successful non-PR store run, otherwise the repository default branch (ankiquest store workflow first, then the upstream one, as before). It emits a notice when it falls back. The download step uses steps.source.outputs.branch.

Tests: node --test .github/tests/*.cjs — added a case that runs the step script against a fake gh covering base-branch hit, default-branch fallback, upstream-workflow fallback and no baseline at all.

Note: pull_request workflows run from the PR's merge ref, so #111 (and other stacked PRs) only pick this up once it reaches their base branch.

PRs that target another feature branch (e.g. #111 onto
move-fork-test-assertions) never find a baseline, because Store Baseline
only publishes for main and dependency-updates. Pick the base branch when
it has a non-PR successful store run, otherwise the default branch.
@float3
float3 merged commit 8844883 into main Nov 4, 2026
38 checks passed
@float3
float3 deleted the fix-screenshot-baseline branch November 4, 2026 15:27
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.

1 participant