pr▌
lobehub/lobehub · updated Apr 8, 2026
If current branch is canary (or main) AND there are uncommitted changes:
Create Pull Request
Branch Strategy
- Target branch:
canary(development branch, cloud production) mainis the release branch — never PR directly to main
Steps
1. Gather context (run in parallel)
git branch --show-current— current branch namegit status --short— uncommitted changesgit 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 diff --stat --stat-count=20 origin/canary..HEAD— change summary
2. Handle uncommitted changes on default branch
If current branch is canary (or main) AND there are uncommitted changes:
- Analyze the diff (
git diff) to understand the changes - Infer a branch name from the changes, format:
<type>/<short-description>(e.g.fix/i18n-cjk-spacing) - Create and switch to the new branch:
git checkout -b <branch-name> - Stage relevant files:
git add <files>(prefer explicit file paths overgit add .) - Commit with a proper gitmoji message
- Continue to step 3
If current branch is canary/main but there are NO uncommitted changes and no unpushed commits, abort — nothing to create a PR for.
3. Push if needed
- No upstream:
git push -u origin $(git branch --show-current) - Has upstream:
git push origin $(git branch --show-current)
4. 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
5. 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
6. 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
- Language: All PR content must be in English
- If a PR already exists for the branch, inform the user instead of creating a duplicate
Ratings
4.5★★★★★10 reviews- ★★★★★Shikha Mishra· Oct 10, 2024
pr is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Piyush G· Sep 9, 2024
Keeps context tight: pr is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Chaitanya Patil· Aug 8, 2024
Registry listing for pr matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Sakshi Patil· Jul 7, 2024
pr reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Ganesh Mohane· Jun 6, 2024
I recommend pr for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Oshnikdeep· May 5, 2024
Useful defaults in pr — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Dhruvi Jain· Apr 4, 2024
pr has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Rahul Santra· Mar 3, 2024
Solid pick for teams standardizing on skills: pr is focused, and the summary matches what you get after install.
- ★★★★★Pratham Ware· Feb 2, 2024
We added pr from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Yash Thakker· Jan 1, 2024
pr fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.