name: create-draft-pr description: Create a draft pull request with conventional commit message and structured PR body targeting master branch disable-model-invocation: true
Create Draft PR
Create a draft pull request with your changes.
Usage
/create-draft-pr <ComponentName> <brief-description>
Example:
/create-draft-pr Popover update design tokens and add new placement
/create-draft-pr Button add new variant and fix padding
Instructions
Step 1: Commit Your Changes
# Stage all changes
git add .
# Commit with a conventional commit message
git commit -m "feat(<ComponentName>): <brief description>"
Important: Commit messages must follow Conventional Commits specification.
Commit Prefixes:
feat:- New feature or enhancementfix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Test updateschore:- Build/tooling changes
Examples:
feat(Popover): add new placement optionsfix(Button): correct padding in small variantdocs(Tooltip): update knowledgebase with new props
Step 2: Push and Create Draft PR
# Push branch to remote
git push -u origin HEAD
# Create draft PR using gh cli with master as base
gh pr create --base master --draft --title "feat(<ComponentName>): <brief description>" --body "$(cat <<'EOF'
## Summary
- Updated <ComponentName> with latest Figma designs
- Added/Modified [list specific changes]
## Changes
- Updated design tokens for spacing/colors
- Added new props: [list new props if any]
- Updated knowledgebase documentation
- Updated stories
## Visual Verification
[Add screenshots from Storybook if helpful]
## Testing
- ✅ All unit tests passing
- ✅ Visual verification in Storybook
- ✅ Linting and type checks passing
## Related
Figma: [link to Figma design]
EOF
)"
Step 3: PR Title Requirements
- Must follow Conventional Commits specification
- Will be checked by
blade-pr-title-checkGitHub action - Format:
type(scope): description - Example:
feat(Popover): update design tokens and add new placement
Step 4: Mark as Ready When Checks Pass
The PR is created as a draft by default. Once all checks pass and you've verified everything, mark it as ready for review:
gh pr ready
Step 5: Verify PR Checks
After creating the PR, verify:
- ✅ PR title check passes
- ✅ Lint and validation checks pass
- ✅ Unit tests pass
- ✅ Type checks pass
If any checks fail, push fixes to the same branch to update the PR:
# Make fixes
git add .
git commit -m "fix: address PR feedback"
git push
PR Body Template
When creating the PR, include:
- Summary - High-level overview of changes
- Changes - Detailed list of what was modified
- Visual Verification - Screenshots or videos of the component
- Testing - Checklist of testing done
- Related - Links to Figma designs, issues, or related PRs
Tips
- Keep PR title concise but descriptive
- Include screenshots for visual changes
- Link to Figma designs in the PR body
- Ensure all tests pass before marking as ready
- Request reviews from design system team members