Repository navigation
feat: preview picked pull requests and email the author from a setup PR's run - #152
Draft
ivanmilevtues wants to merge 2 commits into
Draft
ivanmilevtues wants to merge 2 commits into
ivanmilevtues wants to merge 2 commits into
Conversation
…PR's run Before a setup PR merges, its own run is the only one GitHub starts for us. That run now reviews up to three open pull requests the app lists in the setup PR's description (<!-- codeboarding:preview 412,409,401 -->), each applied to the commit the map was built from and analysed incrementally from it, and uploads each as codeboarding-preview-<run>-<attempt>-pr<n>. Nothing is posted on those pull requests. The sticky review comment is edited, and edits send no notification, so the run also posts one new comment on the setup PR when the first preview (or, without previews, the map) is ready. GitHub emails it to the PR's author, who is the person who asked for the map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
CodeBoarding reviewStatus: 0 changed components (no analysed file changed) See the full change in CodeBoarding. graph LR
n_Action_Workflow_Scripts["Action Workflow Scripts"]
classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
|
The app attributes an artifact to a pull request per run, and every preview shares the setup PR's run, so the name carries the pull request and the head it reviewed, as the legacy codeboarding-pr-<pr>-<head> names did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
A new user sees their map before merging the setup PR, but never one of their own pull requests on it, and they have to sit on the progress page for 5 to 10 minutes because nothing tells them when it is done. Before the setup PR merges, its own
pull_requestrun is the only one GitHub starts for us (comment commands and dispatches need the workflow on the default branch), so both have to happen inside that run.What changes
On a run whose head branch is
codeboarding/setup-action, after the map is uploaded and the review comment posted:<!-- codeboarding:preview 412,409,401 -->from the setup PR's description through the API (not the event payload, so a list changed while the map was building counts). At most 3; forks, closed PRs and PRs into another branch are skipped with a notice.codeboarding-preview-<run>-<attempt>-pr<n>-<head sha>(so the app attributes it without a download), metadatabasis: preview,setup_pr, the PR'shead_sha. Nothing is posted on those PRs.The preview names deliberately avoid
codeboarding-review-<run>-…: the webview takes the newest artifact with that prefix as the setup PR's own review, so a preview named that way would replace the setup PR's map.All new steps are
continue-on-error. Credentials stay through the previews on a setup PR's run only; the last preview step and thealways()cleanup (moved after the previews) remove them. Every other PR's run is unchanged.Depends on
The webview half (picker that writes the description line, previews shown on PR N's page, per-PR progress) is CodeBoarding/CodeBoarding-webview#227. Until it ships, no setup PR carries the line, so this only adds the ready email.
Tests
python -m unittest discover -s tests: 261 pass. New:tests/test_setup_previews.py(resolution against a stubgh; previews against a real git history where main moved after the PR forked; a conflicting PR skipped; metadata; inlined base) andtests/test_setup_ready_notice.py.tests/test_with_auth.pynow allows the head analysis to keep credentials on a setup PR's run only. Protected tests untouched and passing. Not yet run on a live setup PR.Nothing visible changes in an app; the visible output is the comment text in
notify-setup-ready.sh.🤖 Generated with Claude Code