Skip to content

Build PR tooling from the base branch tip, not the event's base sha - #554

Merged
ryanrhughes merged 1 commit into
masterfrom
ci/tooling-from-base-branch
Sep 20, 2026
Merged

ryanrhughes merged 1 commit into
masterfrom
ci/tooling-from-base-branch

Conversation

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Why

github.event.pull_request.base.sha is a snapshot taken at the PR's last push, not the current tip of master. A reopened or rerun PR builds with the tooling master had back then. Concretely: after #553 merged, the daily sync PR #512 was reopened and its build checked out bda2a07, a base without helpers/artifact-helpers.sh, so every job died at "Pack artifact" with No such file or directory. Rebasing the PR was the only way to pick the fix up.

What

Both checkouts in build-pr.yml use base.ref (the branch) instead of base.sha. The changed-package diff and the empty-PR check still compare base.sha to head.sha, so the plan is unchanged. Only the tooling that runs on the droplet moves to the tip, which is what the existing comment already promises.

Verified

  • node --test tests/pr-workflow-approval.cjs: 34/34.
  • actionlint: no new findings.

github.event.pull_request.base.sha is a snapshot taken when the PR was
last pushed, not the current tip of the base branch. A reopened or rerun
PR therefore builds with whatever master looked like at its last push,
and a tooling fix that landed on master since then never reaches it:
the daily sync PR reopened after #553 merged checked out a base without
helpers/artifact-helpers.sh and failed at "Pack artifact".

Check out base.ref instead. The plan's diff and the empty-PR check still
compare base.sha to head.sha, so the list of changed packages is
unaffected; only the tooling that runs on the droplet moves to the tip.
@ryanrhughes
ryanrhughes merged commit f0d18a8 into master Sep 20, 2026
6 checks passed
@ryanrhughes
ryanrhughes deleted the ci/tooling-from-base-branch branch September 20, 2026 20:42
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