DiffGate meets teams where review happens: the pull request. It posts inline review
comments on the changed lines and sets a diffgate commit status that gates merge on
high-impact (🟠 orange) findings.
There are two ways to run it. Start with the Action — it's zero-infrastructure and works today. Graduate to the App when you want one-click org-wide rollout.
Drop .github/workflows/diffgate.yml into a repo.
On every PR it runs:
diffgate check --base="origin/$BASE" --pr="$PR_NUMBER" --no-gate--base=<ref>diffs the whole PR against the base branch (the working tree is clean in CI, so plain--workingwould see nothing).--pr[=<n>]posts a PR review (inline comments + summary) and adiffgatecommit status. It usesGITHUB_TOKEN/GITHUB_REPOSITORY/ the event payload from the Actions environment automatically.- Exit code is
1when orange findings are present, which fails the check.
Make it a required status check (Settings → Branches → Branch protection → require
diffgate) and orange findings now block merge — a gate, not just another comment.
Preview locally without posting:
diffgate check --base=origin/main --pr-dry-run # prints the exact payload it would POSTThe Action lives per-repo. An App installs once across an org and reviews every repo, which is the bottom-up adoption motion the market leaders use.
A hosted webhook service is required (DiffGate's engine is the same; the App is the
transport). app-manifest.json is a ready-to-use
App manifest:
- Host a small webhook server (receives
pull_requestevents, runsdiffgate check --base=<base> --pr=<n>with the installation token). - Create the App from the manifest (fill in
hook_attributes.urlandredirect_url), or register it interactively. - Install on the org; reviews start on the next PR.
Permissions requested (least-privilege): pull_requests: write, statuses: write,
contents: read, metadata: read.
The webhook server is intentionally out of this repo — deploy it on your own infra so code never leaves your boundary. The CLI's
--prpath is the exact call the server makes.