GH PR Workflow
Scope
Use this skill for Motoki0705/tennis-lab PR creation and maintenance via gh CLI.
Defaults and fixed values
- •Repo:
Motoki0705/tennis-lab - •Base branch:
main - •Project (Projects v2):
- •Title:
prj-tennis-lab - •Number:
3 - •Project ID:
PVT_kwHOB-BMQ84BKNof
- •Title:
- •Status field ID:
PVTSSF_lAHOB-BMQ84BKNofzg6JZvQ - •Status options:
- •Backlog:
f75ad846 - •Ready:
61e4505c - •In progress:
47fc9ee4 - •In review:
df73e18b - •Done:
98236657
- •Backlog:
Labels in this repo (from gh label list)
- •
bug: use for defects or regressions. - •
documentation: use for docs-only changes. - •
duplicate: use when the issue already exists elsewhere. - •
enhancement: use for new features or improvements. - •
good first issue: use for newcomer-friendly, well-scoped tasks. - •
help wanted: use when extra help is explicitly desired. - •
invalid: use when the report is not actionable or incorrect. - •
question: use when more information is required. - •
wontfix: use when the issue will not be addressed. - •
research: use for investigation or exploratory tasks.
Create a PR (standard)
- •Ensure the branch has at least one commit different from
main. - •Create with explicit flags:
bash
gh pr create --repo Motoki0705/tennis-lab \ --base main \ --head "<branch>" \ --title "<Title>" \ --body "<Body>" \ --label "<label>" \ --label "<label>" \ --assignee "@me" \ --project "prj-tennis-lab"
Set project Status
- •Get the item ID with
gh project item-listand match by PR URL/number. - •Edit the Status field with
--project-id.
bash
gh project item-edit --project-id PVT_kwHOB-BMQ84BKNof \ --id "<ITEM_ID>" \ --field-id PVTSSF_lAHOB-BMQ84BKNofzg6JZvQ \ --single-select-option-id "<STATUS_OPTION_ID>"
Link issues via Development
To link an issue in Development, add closing keywords to the PR body.
text
Closes #149 References #148
- •
Closes/Fixes/Resolveslinks the issue and auto-closes on merge. - •
Referencesis contextual only; no Development link.
Optional PR flags to consider
- •Reviewers:
--reviewer <user|team> - •Draft:
--draft - •Milestone:
--milestone <name> - •Autofill:
--fill/--fill-verbose - •No maintainer edits:
--no-maintainer-edit - •Template:
--template <name>
Common gotchas
- •PR create fails if there are no commits between base and head.
- •
gh pr edituses--add-assignee/--remove-assignee. - •Use repeated
--labelflags (avoid comma lists).