| name | open-pr |
| description | Open a GitHub PR for the current feature branch, link it to all the issues it resolves, and apply the Has PR label to each. Run this once you have real commits on a feature branch created by plan-issue. One PR typically bundles several issues. |
open-pr
Open a pull request for the work on the current feature branch and wire it to all the issues it resolves, matching bfportal conventions. A feature branch usually closes multiple issues (e.g. PR #251 closed #248, #249, #250).
Preconditions
- You are on a feature branch (not
main), and it has at least one commit ahead of main.
Steps
-
Determine which issues this PR closes. The branch is named after the feature, not an issue, so gather the set explicitly:
-
Sync the branch:
git push -u origin HEAD
-
Draft the PR:
-
Show the user the title, body, and the full issue list before creating — PR creation is outward-facing.
-
Create the PR against main:
gh pr create --base main --title "<title>" --body "<body>"
Add --draft if the user says the work isn't ready for review.
-
Apply the Has PR label to every linked issue:
for n in 248 249 250; do gh issue edit "$n" --add-label "Has PR"; done
-
Report the PR URL and the issues it closes.
Notes
- If some commits look unrelated to the listed issues, flag the mismatch to the user instead of forcing the links.
- If
gh isn't authenticated, tell the user to run ! gh auth login.