mergewarden
v0.10.4
Published
Reports what a pull request changed that a maintainer normally checks by hand, starting with the files coding agents read as instructions
Maintainers
Readme
MergeWarden CLI
Reads a GitHub pull request through the API and reports what a maintainer would normally check by hand. It never clones the repository, never executes pull-request-controlled code, and never calls a language model.
The npm package is mergewarden and the installed executable is mergewarden.
Most people run this as a GitHub Action so it happens on every pull request. The CLI is for looking at one pull request, or a whole queue, from your terminal.
Try one finding
npx --yes mergewarden demoOnce npm has downloaded the package, the demo needs no token or repository and
makes no GitHub API calls. It scans one synthetic pull request that quietly
edits CLAUDE.md and reports the finding a default installation would leave for
a reviewer.
Read a whole queue
npx [email protected] triage owner/repository20 open pull request(s) read. 9 have something a maintainer checks by hand.
#6941 update-unmanaged-certificates no description · template unused
#7227 add-tests no linked issue · oversized
#7790 feat/dedup-dynamic-upstreams no linked issue · template unused
Nothing was closed, labelled, or commented on.This needs GH_TOKEN set, even on a public repository. It makes one request
per pull request, and GitHub allows 60 an hour without one. A personal access
token with no scopes selected is enough, since nothing here writes. Without one
it reports what it could not read and exits non-zero rather than showing a queue
it only half saw.
Scan one pull request
npx [email protected] scan owner/repository#123Full pull request URLs are accepted too. A single public pull request works without a token.
mergewarden scan https://github.com/owner/repository/pull/123 --format markdown
mergewarden scan owner/repository#123 --config policies/mergewarden.yml --mode warnSet GH_TOKEN (preferred) or GITHUB_TOKEN for private repositories and higher
rate limits. There is deliberately no command-line flag for the token, because
flags end up in shell history and CI logs.
Exit codes are stable. scan and replay return 0 for a complete pass or
warning, 1 for a complete block decision, and 2 for usage, API,
configuration, or incomplete-analysis failures.
triage differs, because a partly-read queue is still worth printing: 0 when
every pull request was read, 1 when some could not be and the answer is
therefore partial, and 2 when the arguments were wrong or the listing itself
failed.
Replay a local fixture
mergewarden replay path/to/fixtureA fixture directory contains mergewarden.yml, fixture.json, and optionally
pr-body.md. Replay is fully local and deterministic, with no network and no
token. The repository's own fixtures live under
fixtures/ and are
not bundled in this package.
Run mergewarden --help for the complete command reference.
Security boundary
The policy comes from the pull request's base commit, never from the pull request itself. It does not check out either branch, evaluate workflow expressions, run package scripts, or call a model during analysis.
License: MIT. See THIRD_PARTY_NOTICES.md for bundled dependency notices.
