pr
Original:🇺🇸 English
Translated
Create a PR for the current branch. Use when the user asks to create a pull request, submit PR, or says 'pr'.
2installs
Sourcelobehub/lobehub
Added on
NPX Install
npx skill4agent add lobehub/lobehub prTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Create Pull Request
Branch Strategy
- Target branch: (development branch, cloud production)
canary - is the release branch — never PR directly to main
main
Steps
-
Gather context (run in parallel):
- — current branch name
git branch --show-current - — remote tracking status
git rev-parse --abbrev-ref @{u} 2>/dev/null - — unpushed commits
git log --oneline origin/canary..HEAD - — existing PR
gh pr list --head "$(git branch --show-current)" --json number,title,state,url - — commit history for PR title
git log --oneline origin/canary..HEAD - — change summary
git diff --stat --stat-count=20 origin/canary..HEAD
-
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 (), fill checkboxes
.github/PULL_REQUEST_TEMPLATE.md - 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 as the body structure. Key sections:
.github/PULL_REQUEST_TEMPLATE.md- 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 or
✨ feat/trigger releases — use carefully🐛 fix - Language: All PR content must be in English
- If a PR already exists for the branch, inform the user instead of creating a duplicate