# Pull requests and GitHub Actions

[View as human](https://replume.dev/docs/pull-requests/)

## Post a saved report

Install GitHub CLI and sign in with `gh auth login`. After a Replume session, run these commands on the branch with an open PR:

```sh
replume pr --dry-run
replume pr
```

The first prints the destination and exact comment. The second asks before posting. A later run updates the previous Replume comment by the same account. Use `--repo OWNER/REPO --pr NUMBER` to choose a different PR. Use `--report PATH` to select a saved verify JSON or a result folder from `replume ci`.

The comment includes the verdict, reason, next step and available evidence. Read the preview before sending. A comment on a public PR is public.

## Check PRs with GitHub Actions

```sh
replume init --ci
```

This writes `.github/workflows/replume.yml`. Review it and commit it on the default branch. The workflow checks the PR head in an isolated copy and writes a job summary. For same-repository PRs, a separate job posts or updates the comment. Fork PRs have a job summary and skip the comment. The template installs project dependencies using the detected Node or Python setup. Add your project’s dependency setup if the template does not cover it.

The PR check has read-only access to your repository. It runs checks on your machine or in CI, and Replume keeps your source code in that environment during verification. A separate job can post the verdict and selected evidence to GitHub.

Replume uses the contract committed on the base branch. If there is none, it drafts policy from the PR title and body using the base files. The check can pass from the diff alone when the required checks pass. The report still says agent steps are unknown. Add `--strict` to the workflow's `replume ci` command to require that evidence too. A failing check or an unconfirmed weakened test can still fail CI.

Require **Replume / verify** in GitHub branch protection after the first successful run. Protect workflow changes separately. If you supply an agent ledger, review it for private content first. It is evidence from the contributor’s machine.

## Confirm a test change in CI

Run the exact `replume confirm-config` command printed in the report, review `.replume/confirmations.jsonl`, and commit it with the change. The PR check reads it only if the base branch has this setting in `.replume/config`:

```yaml
ci:
  head_confirmations: true
```

The `by` name comes from `git user.name` and is self-declared. Anyone who can push to the PR branch can add a confirmation when the base allows it. Keep this off for untrusted contributors.

To require GitHub approval instead, set `ci.head_confirmations: approved` on the base branch. The PR check accepts approval of the PR head commit by someone with write access. A line in the confirmations file alone is insufficient in this mode. The workflow generated by `replume init --ci` runs again when a review is submitted.
