Code Review & Pull Request
Shipping unvetted code to production is how outages and security holes happen. This Code Review & Pull Request SOP gives engineering teams a single, enforceable path from an open PR to a clean merge — pairing relentless automated checks with focused human review so reviewers spend their time on architecture and edge cases, not catching syntax errors.
The workflow gates the merge behind machine logic first: CI/CD runs tests, static analysis, and security scans, and a failure blocks the PR and loops the developer back to fix it. Only then does a peer reviewer weigh in, with an escalation path to a senior code owner for intractable disagreements, and a final conflict-resolution loop if main has moved on.
Import this template into Essoflo to match your branch and merge strategy, wire in your version control, CI/CD, and issue tracker, and assign the developer, reviewer, and code-owner roles to your team.
- Purpose
- Integrate code changes into the main branch safely through automated validation and human review, with clear escalation and conflict handling.
- Scope
- Applies to every change merged into the primary branch, from PR open through merge and branch cleanup.
- Steps
- 8 steps & decisions
- Roles & tools
- Submitting Developer, Peer Reviewer, Senior Developer / Code OwnerVersion Control, CI/CD Pipeline, AI Code Review Agent, Issue Tracker
Step-by-step walkthrough
The same procedure as the diagram above, in reading order — decisions show where each answer leads.
- 1
Open pull request
Open the PR with a clear description and a link to the issue tracker for an audit trail.
Who: Submitting Developer·Tools: Version Control, Issue Tracker
- 2
Automated CI/CD checks pass?
Unit/integration tests, static analysis, and security scans must all pass.
True → Peer review approved?·False → Open pull request
Who: Submitting Developer·Tools: CI/CD Pipeline, AI Code Review Agent
- 3
Peer review approved?
Reviewer checks logic, style adherence, and unmapped edge cases.
True → Merge to production branch·False → Revise & address feedback
Who: Peer Reviewer·Tools: Version Control
- 4
Revise & address feedback
Make requested changes; if there is an intractable disagreement, escalate to the code owner.
Who: Submitting Developer·Tools: Version Control
- 5
Resolved or owner override?
Do revisions satisfy the reviewer, or does the senior code owner override the block?
True → Merge to production branch·False → PR closed without merging
Who: Senior Developer / Code Owner
- 6
Merge to production branch
Merge using the team strategy (e.g. squash and merge).
Who: Submitting Developer·Tools: Version Control
- 7
Clean merge, no conflicts?
Did the merge complete without conflicting with concurrent changes?
True → Merged & feature branch deleted·False → Rebase & resolve conflicts
Who: Submitting Developer
- 8
Rebase & resolve conflicts
Rebase on main, resolve conflicts locally, and push new commits to re-run checks.
Who: Submitting Developer·Tools: Version Control
Related templates
Employee Onboarding
A repeatable first-week onboarding flow that gets new hires set up, trained, and productive — covering accounts, equipment, and role-specific training.
MarketingContent Publishing Workflow
Take a post from approved topic to published: draft, a grouped editorial review (copy + SEO), an approval gate, and publish — with style guidance inline.
ITITIL Incident Management
Restore IT services fast: log and prioritise the incident, triage at L1, escalate to specialists when needed, and verify the fix with the user before closing.
Prefer to start from scratch? Try the free RACI matrix builder or the onboarding program builder — no sign-up needed.