Auto-pin AMY into tulipcc on merge to main#766
Merged
Conversation
When an AMY PR is merged to main, open a submodule-bump PR on shorepine/tulipcc pinning the merged commit so the full tulipcc CI (AMYboard preview, Tulip preview, desktop build) runs against it. The PR lists the merged AMY PR's commits/files, references it, @mentions and assigns the merger, and is left open for manual testing/merge. This is the post-merge integration check; the pre-merge AMYboard HW-CI bench (amyboard-hwci-trigger.yml) is unchanged. Reuses HWCI_BRIDGE_TOKEN (already carries contents/pull-requests/issues write on tulipcc). Uses pull_request_target so merged fork PRs also pin, and opens the PR with that PAT (not GITHUB_TOKEN) so tulipcc CI actually triggers. Pins merge_commit_sha to avoid racing release.yml's bump. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
⛓️ tulipcc integration PR openedThis merge was pinned into tulipcc for full-system CI: shorepine/tulipcc#1043 Test it there and merge that PR to move tulipcc onto this AMY. |
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.
What
Adds
.github/workflows/tulipcc-pin.yml: when an AMY PR is merged tomain, it automatically opens a PR onshorepine/tulipccthat bumps theamysubmodule to the just-merged commit, so the full tulipcc CI runs against this AMY. That tulipcc PR is left open for a human to test and merge manually — it's the post-merge, whole-system integration check.The existing pre-merge AMYboard HW-CI (
amyboard-hwci-trigger.yml) is unchanged; this is purely additive.How it works
On merge to
main(when the PR touchedsrc/**oramy/**):amygitlink tomerge_commit_shavia the Git Data API — no checkout of the merged code, no submodule fetch.amy-pin/<sha>on tulipcc, assigns the merger, and posts a back-link comment on the AMY PR.The tulipcc PR body lists the merged PR's commits + a file-change summary, references it as
shorepine/amy#N, andcc @s the merger — so they get emailed and can merge the tulipcc PR themselves once it's green.Key design decisions
pull_request_target, notpull_request— a merged fork PR'spull_requestrun gets no secrets, so it could never reach tulipcc (the same trap the HW-CI bridge hit).pull_request_targetruns in this repo's trusted base context with secrets, and the job never checks out or runs the PR's code.GITHUB_TOKEN— aGITHUB_TOKEN-opened PR triggers nopull_requestworkflows, so tulipcc CI wouldn't run. The PAT-opened PR triggers tulipcc'samyboard-pr-preview/tulip-pr-preview/desktop-linux, which all key off the bareamygitlink path.merge_commit_sha— the exact merged code, and it sidesteps any race withrelease.yml's version-bump commit on the same merge.Token
Reuses the existing
HWCI_BRIDGE_TOKEN— no token changes needed. It already grants Contents + Pull requests + Issues write on both repos (a fine-grained PAT applies one permission set across all its selected repositories, and bothamyandtulipccare in its list).🤖 Generated with Claude Code