HomeBack to recipes
RecipesDevOpsIssue → Branch → PR Pipeline

TL;DR

Issue → Branch → PR Pipeline is a devops workflow that chains GitHub + Linear to automate a common task. A Linear issue assigned to a developer automatically creates a git branch, syncs status changes, and opens a draft PR. Once configured, it saves ~3 hours/week per engineer, plus 2 hours/week of PM chase-down and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.

🐙📐
DevOpsIntermediate

Issue → Branch → PR Pipeline

A Linear issue assigned to a developer automatically creates a git branch, syncs status changes, and opens a draft PR.

10 min setup, zero overhead per issue2 MCPs requiredSaves ~3 hours/week per engineer, plus 2 hours/week of PM chase-down

How it works

🐙GitHub
📐Linear
Automated
1Linear issue assigned to developer2Create feature branch from issue title/ID3Push empty commit to open draft PR+2 more steps
Hostable — runs in your browser2/2 MCPs hosted

Run with MCPizy

New

Execute this recipe in your browser — no local install, no Claude Code. Streams results live.

Whitelisted MCPs: perplexity, notion, anthropic, openai, tavily, firecrawl, coingecko, stripe, slack, github, gitlab, linear, resend, sendgrid, elevenlabs, shopify, sentry, posthog, supabase-mcp, context7, deepwiki~4k tokens  ·  ~$0.012 est.

Why this combo?

Linear is where work gets planned; GitHub is where it gets built. This combo eliminates the manual handoff between issue tracking and code management — branches are named consistently, status always reflects reality, and nothing falls through the cracks when a PR merges.

Without this workflow

Developer creates branch manually, forgets to update Linear status, PM pings to ask what's happening, issue stays open after PR merges.

With MCPizy

Assign issue → branch appears → draft PR opens → status syncs in real time → issue closes on merge. Zero manual overhead.

Business value

Concrete ROI — not marketing fluff.

Time saved

~3 hours/week per engineer, plus 2 hours/week of PM chase-down

  • PMs stop asking 'what's the status?' — Linear reflects reality in real-time, freeing 5+ hours/week of status meetings
  • Enforces consistent branch naming = faster code review + cleaner git history for audits
  • Velocity metrics become trustworthy: cycle time and throughput are auto-measured, not self-reported
  • Reduces context-switching cost — engineers stay in their IDE instead of tabbing to Linear every hour

Workflow steps

  1. 1
    Linear issue assigned to developer
  2. 2
    Create feature branch from issue title/ID
  3. 3
    Push empty commit to open draft PR
  4. 4
    Sync PR status back to Linear on every push
  5. 5
    Auto-close Linear issue when PR merges

Use cases

  • Automatic branch creation with consistent naming from issue IDs
  • Real-time Linear status updates as PRs move through review
  • Auto-close issues when their linked PR is merged
  • Link PRs and issues so nothing gets lost between planning and shipping

MCPs required

🐙

GitHub

GitHub MCP Server

View
📐

Linear

Linear MCP Server

View

Agent prompt (copy into Claude Code)

This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.

You are an issue-to-PR pipeline agent. Runs on Linear webhook events.

On Linear issue assigned (status In Progress):
1. Call linear.get_issue(id) to get title, identifier (e.g. "ENG-123"), description
2. Call github.create_branch(name="${identifier}-${slug(title)}", base="main")
3. Call github.create_commit(branch, message="chore: start ${identifier} ${title}", empty=true)
4. Call github.create_pull_request(head=branch, base=main, title="${identifier}: ${title}", draft=true, body=linear_issue.description + "\n\nLinear: <url>")
5. Call linear.save_issue(id, state="In Review", custom_field_pr=pr_url) — sync the link back

On pull_request merged:
6. Call linear.save_issue(id, state="Done")

Keep PR title in sync when Linear title changes. Report just the PR URL on success.

Trigger & credentials

How this workflow fires and what env vars you need.

.env.example
WebhookTrigger
POST /webhook/linear (Linear → Settings → API → Webhooks, events: Issue, Comment)
🐙GitHub· 2 vars
GITHUB_TOKENGet key

PAT with repo scope

e.g. ghp_...

GITHUB_REPO

Target repo (owner/name)

e.g. acme/app

📐Linear· 2 vars
LINEAR_API_KEYGet key

Linear API key

e.g. lin_api_...

LINEAR_WEBHOOK_SECRET

Webhook signing secret

e.g. a-long-random-string

One-command deploy

Install everything — MCPs, prompt, env template — in a single call.

$ mcpizy recipe install github-linear-issue-branch-pr

✓ Installs all 2 MCP servers
✓ Writes prompt to ~/.mcpizy/prompts/github-linear-issue-branch-pr.md
✓ Generates .env.example in current directory
✓ Ready to paste into Claude Code

Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.

Quick install (MCPs only)

10 min setup, zero overhead per issue
$ mcpizy install github && mcpizy install linear

More DevOps recipes

🟢🐙

Auto DB Migrations on Push

Every push to main triggers a Supabase migration automatically. Schema diffs are committed and applied with zero manual steps.

🐙▲

Preview Deploy on Every PR

Open a PR and a Vercel preview URL appears as a comment within minutes. Branches are cleaned up automatically when PRs close.

🐳☁️

Container Deployment to AWS

Build, tag, push to ECR and deploy to ECS in one automated pipeline triggered by a git tag or manual dispatch.

⚡🐙

Branch-per-PR Databases

Each PR gets its own Neon database branch for isolated testing. Branch is deleted automatically when the PR closes.

Frequently asked questions

What is this workflow?

Issue → Branch → PR Pipeline is a devops automation that uses GitHub + Linear together via the Model Context Protocol. A Linear issue assigned to a developer automatically creates a git branch, syncs status changes, and opens a draft PR.

How long does setup take?

Setup takes around 10 min setup, zero overhead per issue. You install the required MCP servers with `mcpizy install github && mcpizy install linear`, connect your accounts, and the workflow is ready to run.

How much time does this workflow save?

Once running, this workflow saves ~3 hours/week per engineer, plus 2 hours/week of PM chase-down. The concrete business value: PMs stop asking 'what's the status?' — Linear reflects reality in real-time, freeing 5+ hours/week of status meetings; Enforces consistent branch naming = faster code review + cleaner git history for audits.

Which MCP servers do I need for this?

You need 2 MCP servers: GitHub (mcpizy install github), Linear (mcpizy install linear). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.

Does this work with Claude Code, Cursor, and Windsurf?

Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.

Start building this workflow

Install the required MCPs from the marketplace and automate this in 10 min setup.

$ mcpizy install github && mcpizy install linear

🐙Install GitHub📐Install Linear

Free to install. Connect your accounts and this workflow runs itself.