GitHub required reviewers vs. a DueReason approval gate
Required reviewers on a GitHub Environment approve a person; they don't bind to a payload. See how DueReason's gate-production-deploy template adds that.
Updated · 7 min read
In short
- A GitHub Environment's required reviewers are people, chosen when the environment is configured; up to six, and only one has to approve for the job to proceed. That approval is not bound to the deploy's commit SHA, tag or target the way a signed grant is.
- Deployment branch and tag policies restrict a deploy by branch or tag name only - there is no condition on any other field of what is being deployed, such as an environment value inside the payload itself.
- DueReason's gate-production-deploy template adds a workflow keyed on payload.environment: production needs an approver group's sign-off, staging auto-approves, and the result is a signed, single-use grant bound to the exact repo, SHA and environment.
- The two pair, they don't compete: required reviewers (or a required status check) still gate the merge or the job itself; the gate's grant is what a verify step checks before the deploy runs, including on a later manual re-run or rollback a required-reviewer approval never covered.
GitHub Environments already let a repository require a person's sign-off before a job touching production runs. If your team is hitting the edges of that - more approver conditions than "these six people", or a need to reuse the same gate outside GitHub Actions entirely - here is what required reviewers do today, where that stops, and what changes if you put DueReason's gate-production-deploy template in front of the same deploy.
What GitHub's required reviewers do today
An environment's Required reviewers setting names up to six people or teams; a job that references the environment waits with a status of "Waiting" until one of them approves it, and fails automatically if nobody does within 30 days. Reviewers need at least read access to the repository, and you can require that the person who triggered the deployment cannot be the one who approves it. None of this is conditional on anything in the deploy itself - the same reviewer list applies to the environment regardless of which commit, tag or branch is being deployed.
Deployment branches and tags is the other protection rule on an environment: restrict which branch or tag names can deploy to it at all (no restriction, protected branches only, or a list of name patterns matched against the workflow run's GITHUB_REF). It is a branch-name allowlist, not a condition on anything else about the deploy.
Where that stops
Required reviewers answer "did an eligible person click approve", not "does this specific deploy meet a rule that depends on its own payload". Two gaps follow directly from how the feature works:
- No payload binding. The approval is recorded against the environment and the run; nothing about it is cryptographically tied to the exact commit SHA, image tag or target that ends up deploying. A later manual re-run of the same already-approved workflow, or a rollback to an older commit, is not independently checked against what was approved - GitHub's own docs note a required-reviewer approval is for the job, not a signed object a downstream system can verify offline.
- No conditional approver routing beyond branch name. You cannot say "require a second group only when the target is
productionand the payload names a specific environment field" - deployment branch and tag policies match branch or tag name patterns, and required reviewers are a fixed list per environment, not a rule evaluated against arbitrary payload fields.
Neither gap is a bug in GitHub Environments; it is scoped to GitHub Actions jobs referencing an environment. A pipeline that is not a GitHub Actions workflow - GitLab CI, Jenkins, an Argo CD pre-sync hook, or an AI coding agent's own shell - has no equivalent built in at all.
What gate-production-deploy adds on top
DueReason ships a template, gate-production-deploy, installed directly from the Agent gate setup page for exactly this case: an AI coding agent or CI pipeline wants to tag or deploy, and a production target should need a sign-off that staging does not. Its action (gate.production-deploy) takes a payload of repo, sha, environment (staging or production) and an optional tag, and two workflows route on payload.environment: Production requires one approver from the Agent approvers group with no evidence required; Staging auto-approves with no steps at all. That condition is evaluated against the payload DueReason received, not a branch name GitHub infers from GITHUB_REF.
Once approved, the result is a signed, single-use grant bound to the exact repo/sha/environment hash - not a checkbox state on an environment. A verify step (duereason-gate verify, or the equivalent required-status-check pattern covered in the production deploys guide) checks that grant offline against DueReason's published keys before the deploy runs, and refuses a grant for a different SHA, a different environment, or one that has since expired - including on a manual re-run or a rollback that a required-reviewer approval from the original run never covered.
The policy side - deciding which shell commands, git tag pushes or MCP calls should even file that request - is @duereason/gate's job, covered end to end in the agent-gate guide. That package is published to npm: npm install -g @duereason/gate installs it today. The adapter code for Claude Code, Cursor, Hermes, OpenCode, Codex, Gemini CLI, Windsurf, git hooks and a standalone MCP proxy ships in the same package, and Settings > Agent gate generates the action, workflow, a scoped API key and the policy file in the same place.
This pairs with required reviewers, it does not replace them
Nothing here argues for removing GitHub's required reviewers from an environment that already has them. A GitHub Actions job that deploys to a protected environment still waits on its required reviewers exactly as configured; a DueReason-gated agent or non-GitHub pipeline adds a second, payload-bound check in front of the same production target, the same two-layer pattern - a check at the agent, a check at the target - described for the git-hook and CI case in protecting production deploys. Running both is not redundant: a required-reviewer approval covers "a person with access clicked approve on this run"; the grant covers "this exact payload was approved and nothing has changed since".
Questions
- Does this replace GitHub Environments' required reviewers?
- No. Required reviewers still gate the GitHub Actions job itself, exactly as configured. gate-production-deploy adds a separate, payload-bound approval and a signed grant in front of a deploy an agent or a non-GitHub pipeline wants to make - the two run alongside each other, not instead of one another.
- Can required reviewers already do conditional routing by environment value, the way gate-production-deploy's workflows do?
- Not on an arbitrary payload field. Required reviewers are a fixed reviewer list per GitHub environment, and deployment branch and tag policies restrict by branch or tag name pattern only. Routing a workflow on payload.environment the way gate-production-deploy's Production and Staging workflows do needs a condition evaluated against the deploy's own payload, which required reviewers don't have.
- Is @duereason/gate installable today?
- Yes. npm install -g @duereason/gate installs it today. Settings > Agent gate generates the gate-production-deploy action, its workflow, a scoped API key and a .duereason/gate.yml policy; the harness adapters (Claude Code, Cursor, Hermes, OpenCode, Codex, Gemini CLI, Windsurf, git hooks, a standalone MCP proxy) ship in the same npm package.
Add a conditional gate GitHub Environments can't do
Install gate-production-deploy from Settings > Agent gate and route production and staging deploys on their own payload, with a signed grant a verify step can check offline.
Create your accountSources
- GitHub Docs: Deployments and environments - Required reviewers
- GitHub Docs: Deployments and environments - Deployment branches and tags
- GitHub Docs: About protected branches
This guide explains the regulation as we read it; it is not legal advice. Check the official text and your national law, which may add obligations.