Add a report to a pull request
On this page
saidran pr adds a report section to the current branch's pull request.
Install GitHub CLI and run gh auth login first.
The command reads your local session log, then uses gh to read or update the PR.
It never runs recorded commands. It creates no local report files or directories.
Preview and publish
Preview the section without changing the PR:
saidran pr --dry-run
Run saidran pr to see the final redacted section and answer the confirmation
question. The preview includes any shortening needed to fit the description.
Use --confirm to publish without the question; the preview still appears.
--dry-run always takes precedence, including with --confirm.
--no-prompt refuses publication unless you also give --confirm.
For scripts, --json returns one document with section, url and status.
The section string includes its markers. Status is previewed for dry-run and
updated after a successful edit. JSON mode suppresses questions and requires
--confirm for publication. Failed commands return the usual JSON error on
stderr without a success document on stdout.
saidran pr --dry-run --json
saidran pr --confirm --json
Reports summarize local logs and Git changes. Saidran cannot tell whether
someone changed the log. Check the preview before sharing it. Redaction masks common
tokens and home paths, but it is not a secret scanner. Run saidran check
locally to obtain full HTML/JSON evidence within privacy limits.
Choose the session and comparison
Automatic session selection works like saidran check. Use --session <id>
for a discovered session or --transcript <file> for an explicit recording.
These two flags cannot be combined. All four supported agents use the same
report model and Markdown renderer.
The default comparison uses the merge base of HEAD and the PR's target commit,
reported by gh pr view as baseRefOid. This works with non-default branches
and forks whose origin/main differs from the target repository. Saidran
never fetches implicitly. If that commit is missing locally, fetch the PR target
repository's base branch and try again.
--base <revision> compares directly against the given revision, as
saidran check --base does.
Keep the rest of the description
The report is wrapped in these comments:
<!-- saidran:start -->
<!-- saidran:end -->
When neither marker exists, Saidran appends the section with two separating
newlines. One ordered pair is replaced on later runs. Text outside the marked
section stays byte for byte unchanged, including whitespace and line endings.
Malformed, duplicate, reversed or unbalanced markers stop the command before
editing. Remove both markers or keep one ordered pair to repair the description.
The complete body is passed to gh pr edit --body-file through a temporary file,
which is removed afterwards.
Description size and errors
The complete PR body is capped at 65,536 UTF-8 bytes. Your text and the comment markers count toward that limit, including their separating newlines. Saidran uses up to 60,000 bytes of the remaining space for the report. It removes command details first, shortens long fields next, then summarizes overflowing lists. It keeps verdict totals, completeness counts, the local-log disclaimer, footer and omission notices. Shortened reports keep valid markup and UTF-8 text.
A 64,000-byte description can fit if the shortened summary fits in the remaining space. If even the shortest summary cannot fit, shorten the existing description and try again. Saidran exits 2 without editing the PR.
Missing or unauthenticated gh exits 3 with a fix. No current PR exits 5.
Usage and confirmation errors exit 1; other runtime failures exit 2.
GitHub Action
The GitHub Action saves a summary and HTML artifact, then
creates or updates its own marked bot comment. It supports diff-only reports or
a CLI transcript recorded in the same checkout. The Action compares directly
against the event's PR base SHA, assuming checkout's default merge ref and
fetch-depth: 0; this differs from saidran pr's inferred merge base.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- uses: vincentsch/[email protected]
with:
fail-on: contradicted,stale,test_skipped
The Action installs its embedded binary version (v0.1.0 here), including with a SHA pin or local checkout. It never selects the latest release implicitly.
Use pull_request with contents: read and pull-requests: write. Fork runs
may be unable to comment; summary and artifact remain available. See the guide
for a complete workflow, permissions and transcript restrictions.