Repository navigation
Conversation
--pr publishes the session and adds one "Agent session" comment to the open PR for the current branch, or to the PR passed by number or URL. Re-running updates that comment instead of adding another. Uses gh when installed, GITHUB_TOKEN otherwise, and falls back to printing the markdown when neither works. Posting to a public repository asks first, or needs --yes. --format markdown prints the same block for any other review tool.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Summary
npx push-session <agent> --prpublishes the session and adds an "Agent session" comment with the share link to the open pull request for the current branch, or to a PR passed by number or URL. Running it again updates that same comment, so a PR never collects duplicates.--format markdownprints the same block for any other review tool.Why this matters
When an agent writes a change, the diff alone doesn't show how it got there: what was asked, what it ran, what it tried and dropped. push-session already turns that history into a scoped, read-only link. This puts the link where review happens, in one command and without copy-paste.
Demo
Simulated demo (HyperFrames) of a run against a private test repository:
Changes
src/pr.jsresolves the PR and upserts the comment. It usesghwhen it is installed (gh pr view,gh api) and otherwiseGITHUB_TOKENwith the REST API. The comment carries a hidden<!-- push-session:<sessionId> -->marker, and the upsert looks for it to decide between PATCH and POST.--yes.--format markdown|text|jsonreplaces the boolean, and--jsonstays as an alias. Text output adds aPR comment (created|updated)line with the comment URL.Testing
npm run checkpasses 82 tests. The newtest/pr.test.jscovers branch-to-PR resolution, the gh and token paths, create then update by marker, comment pagination, the fallback with neither gh nor a token, the public-repo confirmation, and the text output line.createdand the secondupdated. The PR still had exactly one comment, and its link opened the published transcript.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.