pr
17
总安装量
16
周安装量
#20129
全站排名
安装命令
npx skills add https://github.com/lobehub/lobehub --skill pr
Agent 安装分布
codex
16
opencode
15
github-copilot
15
kimi-cli
15
gemini-cli
15
amp
15
Skill 文档
Create Pull Request
Branch Strategy
- Target branch:
canary(development branch, cloud production) mainis the release branch â never PR directly to main
Steps
-
Gather context (run in parallel):
git branch --show-currentâ current branch namegit rev-parse --abbrev-ref @{u} 2>/dev/nullâ remote tracking statusgit log --oneline origin/canary..HEADâ unpushed commitsgh pr list --head "$(git branch --show-current)" --json number,title,state,urlâ existing PRgit log --oneline origin/canary..HEADâ commit history for PR titlegit diff --stat --stat-count=20 origin/canary..HEADâ change summary
-
Push if needed:
- No upstream:
git push -u origin $(git branch --show-current) - Has upstream:
git push origin $(git branch --show-current)
- No upstream:
-
Search related GitHub issues:
gh issue list --search "<keywords>" --state all --limit 10- Only link issues with matching scope (avoid large umbrella issues)
- Skip if no matching issue found
-
Create PR with
gh pr create --base canary:- Title:
<gitmoji> <type>(<scope>): <description> - Body: based on PR template (
.github/PULL_REQUEST_TEMPLATE.md), fill checkboxes - Link related GitHub issues using magic keywords (
Fixes #123,Closes #123) - Link Linear issues if applicable (
Fixes LOBE-xxx) - Use HEREDOC for body to preserve formatting
- Title:
-
Open in browser:
gh pr view --web
PR Template
Use .github/PULL_REQUEST_TEMPLATE.md as the body structure. Key sections:
- Change Type: Check the appropriate gitmoji type
- Related Issue: Link GitHub/Linear issues with magic keywords
- Description of Change: Summarize what and why
- How to Test: Describe test approach, check relevant boxes
Notes
- Release impact: PR titles with
⨠feat/orð fixtrigger releases â use carefully - Language: All PR content must be in English
- If a PR already exists for the branch, inform the user instead of creating a duplicate