2.4 KiB
2.4 KiB
description, allowed-tools
| description | allowed-tools | |||||
|---|---|---|---|---|---|---|
| Create a pull request following the strict workflow |
|
You are helping the user create a pull request following their strict workflow.
MANDATORY STEPS (DO NOT SKIP):
-
Branch Analysis (run in parallel)
git status- See untracked filesgit diff- See staged and unstaged changesgit branch --show-current- Get current branch namegit log origin/main..HEAD --oneline- See all commits in this branchgit diff origin/main...HEAD- See full diff from main
-
PR Content Analysis
- Review ALL commits (not just the latest) to understand full scope
- Analyze all code changes from when branch diverged from main
- Draft comprehensive PR summary covering all changes
-
Push to Remote
- Check if branch tracks remote:
git rev-parse --abbrev-ref --symbolic-full-name @{u} - If no remote tracking or not up to date:
git push -u origin <branch-name>
- Check if branch tracks remote:
-
Create PR with gh
- Use semantic prefix in title:
feat:,fix:,docs:,chore: - Use HEREDOC for body to ensure proper formatting
- Follow this template:
gh pr create --title "type: brief description" --body "$(cat <<'EOF' #### Description [1-3 bullet points summarizing ALL changes] [It can be a 3-5 sentences description explaining why the changes are needed] #### Ticket(s) [ticket/issue url or "N/A"] #### Action points [bullets of actions needed, or "None"] EOF )" - Use semantic prefix in title:
-
Return PR URL
- Show the created PR URL to the user
IMPORTANT RULES:
- NEVER use TodoWrite tool
- DO NOT run additional code exploration beyond git commands
- Focus on ALL commits in the branch, not just the latest one
- Be thorough in analyzing the full diff from main
- Ask about ticket association if not obvious from commits
- Keep title under 50 characters
- Use present tense in description ("Add" not "Added")
Example:
gh pr create --title "feat: add user authentication" --body "$(cat <<'EOF'
#### Description
- Implement JWT-based authentication service
- Add login/logout endpoints with validation
- Create user session management with secure tokens
#### Ticket(s)
https://github.com/org/repo/issues/123
#### Action points
- Update environment variables with JWT_SECRET
- Run database migrations for user tables
EOF
)"
Now proceed with the PR creation workflow.