General
PromptBeginner5 minmarkdown
2. Apply Deepthink Protocol (reason about dependencies
risks
16
This rule applies when creating pull requests using the GitHub CLI.
Sign in to like and favorite skills
Pull request creation should be based on the GitHub CLI (
gh) and follow best practices for small, focused, and well-documented changes.
gh pr create --title "Your PR Title" --body "Your PR Description" --base main
When creating a new branch, always branch from the latest
main to avoid conflicts:
# Ensure you have the latest main git fetch origin git checkout main git pull origin main # Create your feature branch git checkout -b feature/your-feature-name
Every PR description must include the following sections:
Clearly explain why this change is needed:
## Purpose This PR adds user authentication middleware to secure our API endpoints.
Summarize the key changes made:
## What Changed - Added JWT authentication middleware - Updated route handlers to use authentication - Added tests for authentication flow - Updated API documentation
Include links to relevant information:
## Additional Context - Closes #123 - Related to discussion in #456 - Follows up on PR #789 - See design document: [link]
## Purpose [Explain why this change is needed] ## What Changed - [Key change 1] - [Key change 2] - [Key change 3] ## Additional Context - [Links to issues, tickets, or previous conversations] - [Any relevant background information] - [Breaking changes or migration notes if applicable] ## Testing [How to test these changes] ## Screenshots (if applicable) [Include screenshots for UI changes]
# Ensure your branch is up to date git fetch origin git rebase origin/main # Push your branch git push origin your-branch-name
# Create PR with title and description gh pr create \ --title "Your descriptive title" \ --body "$(cat << 'EOF' ## Purpose [Your purpose here] ## What Changed - [Change 1] - [Change 2] ## Additional Context - Closes #123 EOF )" \ --base main
# Assign yourself as reviewer if needed gh pr edit --add-assignee @me # Add labels if your repository uses them gh pr edit --add-label "feature" --add-label "backend" # Request specific reviewers gh pr edit --add-reviewer username1,username2
Before creating a PR, ensure:
# View your PR gh pr view # View PR in browser gh pr view --web # Check PR status gh pr status
# Update PR title gh pr edit --title "New title" # Update PR description gh pr edit --body "New description" # Add reviewers gh pr edit --add-reviewer username
# Merge when ready (if you have permissions) gh pr merge --squash gh pr merge --merge gh pr merge --rebase
gh pr create \ --title "Add user profile endpoint" \ --body "## Purpose Add a new API endpoint to fetch user profile information. ## What Changed - Added GET /api/users/profile endpoint - Added UserProfile model and schema - Added tests for the new endpoint - Updated API documentation ## Additional Context - Closes #456 - Part of user management feature set" \ --base main
gh pr create \ --title "Fix memory leak in data processor" \ --body "## Purpose Resolve memory leak that occurs during large data processing operations. ## What Changed - Fixed event listener cleanup in DataProcessor class - Added proper resource disposal in error handling - Added memory usage tests ## Additional Context - Fixes #789 - Reported by users processing >10MB files" \ --base main
Follow the project's branch naming conventions:
feature/descriptionfix/descriptionhotfix/descriptiongit push origin branch-name# View gh pr help gh pr create --help # Check authentication gh auth status # View repository info gh repo view