Create a GitHub pull request from the current branch to the upstream repo, using the repo's PR template
Create a GitHub pull request from the current branch to the upstream repository.
$ARGUMENTS may contain:
--draft: create as a draft PR--title 'PR title': override the PR title (default: auto-generated from changes)Run these in parallel:
# Check remotes — identify the fork remote and the upstream remote
git remote -v
# Current branch and tracking info
git branch -vv --contains HEAD
# Untracked/unstaged changes (warn user if dirty)
git status -s
# Default branch of the upstream repo
gh api repos/<UPSTREAM_OWNER>/<UPSTREAM_REPO> --jq '.default_branch'
Determine:
local or origin if the user's fork)alice from [email protected]:alice/LMCache.git)$ARGUMENTS or the upstream repo's default branchVerify the current branch is pushed to the fork remote. If not, warn the user and stop — do NOT push without explicit permission.
Glob pattern: .github/PULL_REQUEST_TEMPLATE.md
Glob pattern: .github/PULL_REQUEST_TEMPLATE/**/*.md
Glob pattern: .github/pull_request_template.md
Read the template to understand required sections.
# Commits on this branch vs the base
git log --oneline <upstream_remote>/<base_branch>..HEAD
# Diff stat for summary
git diff <upstream_remote>/<base_branch>..HEAD --stat
If there are many commits, also read the full diff to understand the changes:
git diff <upstream_remote>/<base_branch>..HEAD
--title from arguments if provided. Otherwise, generate a concise title (under 70 chars) summarizing the change.Show the drafted title and body to the user and ask for confirmation before creating the PR.
Use the mcp__github__create_pull_request tool:
owner: upstream repo ownerrepo: upstream repo namehead: <fork_owner>:<branch_name>base: the base branchtitle: the PR titlebody: the PR bodydraft: true if --draft was specifiedPrint the PR URL so the user can review it.