GitHub PR review and merge flow
A pull request review flowchart with CI checks, two required approvals, conflict resolution path, and squash merge to main with auto-deploy trigger.
Flowchart previewGitHub PR review and merge flow
Recreate this in Raltey
Copy this prompt
Paste this into Raltey's AI agent to generate the same diagram, then tweak it on the canvas.
Prompt
Create a flowchart for a GitHub pull request lifecycle. PR opens, CI runs, if CI fails the author fixes and CI re-runs. Once CI passes, request reviews; require 2 approvals (loop back to address feedback otherwise). After approval, check for merge conflicts; on conflict, rebase on main and re-run CI; clean merges go to squash merge and trigger deploy.
Context
- - CI must pass before review starts.
- - Two approvals required; reviewers cannot include the author.
- - Squash-merge keeps main linear.
Patterns
- - CI gate before review.
- - Two-approval rule, rebase-only conflict resolution.
- - Squash merge keeps history linear.
Diagram structure
Nodes and connections
PR openedstart
Run CIaction
CI passes?decision
Author fixes CIaction
Request reviewsaction
2 approvals?decision
Address feedbackaction
Conflicts?decision
Rebase on mainaction
Squash mergeaction
Trigger deployaction
Doneend
Connections
PR openedRun CI
Run CICI passes?
CI passes?Author fixes CIno
Author fixes CIRun CI
CI passes?Request reviewsyes
Request reviews2 approvals?
2 approvals?Address feedbackno
Address feedbackRequest reviews
2 approvals?Conflicts?yes
Conflicts?Rebase on mainyes
Rebase on mainRun CI
Conflicts?Squash mergeno
Squash mergeTrigger deploy
Trigger deployDone
Notes from the field
- Add a "needs-product-review" branch for product-impacting PRs.
- Require a clean rebase before merge to keep main green.
- Auto-deploy only from main to keep blast radius predictable.
Frequently asked
Can I require a CODEOWNERS review?
Yes. Branch the approval step into one path that requires the CODEOWNERS reviewer and one that doesn't. The two-approval rule still applies.
Is this free?
Raltey's Free plan includes the AI agent, 5 projects, and 10 AI generations per month. No credit card required.
More templates
FlowchartSaaS onboarding email flowFlowchartCustomer support runbook flowFlowchartPayment webhook retry and error flowFlowchartLogin with magic link flowArchitectureThree-tier SaaS architecture on AWSArchitectureMicroservices architecture on KubernetesArchitectureReal-time data pipeline on GCPArchitectureNext.js + Vercel + Postgres SaaS stack
Open this template in Raltey
Edit it on the canvas, ask the AI agent to extend it, then share or export.
Start for free