Your friendly GitHub CLI extension for branches & pull requests 🤝
A GitHub CLI extension that helps you create branches and pull requests following consistent naming conventions, directly from GitHub issues.
gh extension install jesusgpo/gh-buddygh buddy --help
GitHub CLI Buddy Extension
Buddy helps you create branches and pull requests following
consistent naming conventions, directly from GitHub issues.
Usage:
buddy [command]
Available Commands:
create-branch Create a local branch from an issue
create-pr Create a pull request from the current local branch
help Help about any command
Flags:
-h, --help help for buddy
-v, --version version for buddy
-y, --yes use the default proposed fields
# Interactive: select from your assigned issues
gh buddy create-branch
# From a specific issue
gh buddy create-branch --issue 42
# With a specific type
gh buddy create-branch --issue 42 --type bugfix
# From a different base branch
gh buddy create-branch --issue 42 --base develop
# Non-interactive: use all defaults
gh buddy create-branch --issue 42 -yBranch naming convention: <type>/GH-<issue-number>-<slugified-title>
Supported types: feature, bugfix, hotfix, release, chore, docs, refactor, test
# Auto-detect issue from branch name
gh buddy create-pr
# Link to a specific issue
gh buddy create-pr --issue 42
# Create as a draft
gh buddy create-pr --draft
# Non-interactive
gh buddy create-pr -yThe PR body is auto-generated with:
- Issue description (if linked)
Closes #Nreference for automatic issue closing- Checklist template for unlinked PRs
# Build
make build
# Install locally
make install
# Run tests
make test
# Build for all platforms
make release-
create-branch: Fetches issue details from GitHub, generates a branch name following
type/number-titleconvention, creates the branch from the base, and optionally pushes it. -
create-pr: Detects the issue number from the current branch name (or prompts), fetches issue details, generates title/body, pushes the branch, and creates the PR via
gh.
- GitHub CLI (
gh) installed and authenticated - Git
MIT