| name | pr-from-issue |
| description | Create a PR from a GitHub issue, checking completion status and running all tests |
Create a pull request from a GitHub issue with proper validation:
Step 1 — Issue Completion Check
Check if the issue is marked for closing:
Step 2 — Validation Checks (from do-pr skill)
-
Branch check: Ensure current branch is NOT main
- Run:
git branch --show-current
- If
main, stop with error: "Cannot create PR from main branch. Checkout a feature branch."
-
Chromedriver headless check: Ensure headless is set to true in config/test.exs
- Read
config/test.exs
- Verify:
config :wallaby, chromedriver: [headless: true]
- If not set, set it and warn the user
-
Uncommitted changes check: Verify all changes are committed
- Run:
git status --porcelain
- If output is not empty, stop with error: "Uncommitted changes detected. Commit all changes before creating PR."
-
Run ALL tests: Execute mix test and ensure ALL tests pass
- Run:
mix test
- If any test fails, stop with error: "Tests are failing. Fix all tests before creating PR."
- This is REQUIRED - not optional.
-
Verify commits: Confirm all changes are committed
- Run:
git log main..HEAD --oneline
- Display commits to user for review
Step 3 — Push and Create PR
-
Push to origin:
- Run:
git push -u origin <current-branch>
- If push fails, display error and stop
-
Generate PR title (from do-pr skill):
- Extract feature part after the username/first dash from branch name
- Identify conventional commit type (
feat, fix, build, refactor, etc.) or default to feat
- Format as:
<type>: <description>
- Example:
federicoalcantara-implement_user_profile → feat: implement user profile
-
Generate PR description (from do-pr skill):
- Auto-generate from commits: each commit shown with its message
- Extract key changes from commit bodies
- Format summary for easy review
- Include reference to the issue:
Closes #N
-
Create PR:
- Run: `gh pr create --base main --title "" --body "$(cat <<'EOF'
Summary
Closes #
EOF
)"`
- Display confirmation with PR URL
Step 4 — Output
On success, display:
✅ Pull Request created successfully!
**PR URL:** <pr-url>
**Title:** <title>
**Issue:** #N (Closes)
**Commits:** <count>
**Validation completed:**
- [x] Issue marked as completed
- [x] Not on main branch
- [x] Chromedriver headless: true
- [x] All changes committed
- [x] All tests pass (mix test)
- [x] Pushed to origin
Usage
Run this skill after:
- Completing all work for an issue
- Marking the issue with 'Issue is completed and ready to be closed.' in the description
- Committing all changes with conventional commit messages
- Running local tests
The skill handles: issue validation, test verification, final quality checks, push, and PR creation.