| name | open-pull-request |
| description | Open a pull request from a feature branch using GitHub CLI (preferred) or GitHub MCP tools. Covers pre-flight checks, correct base/head configuration for fork workflows, title/body conventions, and post-creation validation. Use when asked to "open PR", "create pull request", or "submit branch for review". |
| metadata | {"author":"torrust","version":"1.0"} |
Open a Pull Request
This skill explains how to create a pull request for this repository in a repeatable way.
CLI vs MCP decision rule
Use the tool that matches the loop:
- Inner loop (fast local branch work): prefer GitHub CLI (
gh) because it is fast and low overhead.
- Outer loop (cross-system coordination): use MCP when you need structured/authenticated access across shared systems.
For opening a PR from the current local branch, prefer gh pr create.
Pre-flight checks
Before opening a PR:
Title and description convention
Use conventional commit style in the PR title when possible, including issue reference.
Examples:
ci: [#448] add crate publish workflow
docs: [#448] define release process
Include in PR body:
- Summary of changes
- Files/workflows touched
- Validation performed
- Issue link (
Closes #<issue-number>)
Option A (Preferred): GitHub CLI
Same-repo branch
gh pr create \
--repo torrust/torrust-tracker-deployer \
--base main \
--head <branch-name> \
--title "<title>" \
--body "<body>"
Fork branch (common maintainer flow)
gh pr create \
--repo torrust/torrust-tracker-deployer \
--base main \
--head <fork-owner>:<branch-name> \
--title "<title>" \
--body "<body>"
If successful, gh prints the PR URL.
Option B: GitHub MCP tools
When MCP pull request management tools are available:
- Create branch remotely if needed
- Open PR with base
main and correct head branch
- Capture and share resulting PR URL
Post-creation validation
After PR creation:
Troubleshooting
fatal: ... does not appear to be a git repository: push to correct remote (git remote -v)
A pull request already exists: open existing PR URL instead of creating a new one
- Permission errors on upstream repo: create PR from your fork branch (
owner:branch)
References