Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
name, description
| name | description |
|---|---|
| pr | Commit all changes via jsc-git:commit, create a target branch named from the highest-priority commit type plus a summarized title, push, then open a Gitea PR with the templated description against the base branch the caller passed in (falling back to develop, main, master only when none was given). Branch priority is revert > fix > feat > perf > refactor > test > docs > style > chore. Use when work is ready for review; not for plain commits. |
pr — create a Push Request
Steps
- Call
jsc-git:committo commit every file change first. - Pick the base branch. A base branch passed in by the caller wins over everything else —
jsc-sdlc:implementpasses the analysis page's source branch, and silently retargeting that PR atdevelopwould merge a single work package straight past the feature branch it belongs to. Only when no caller supplied one: usedevelopwhen it exists on the remote, elsemain, elsemaster. Verify the chosen base exists on the remote (git fetch --prune originfirst, thengit branch -r); it does not exist → report and stop, never fall back silently. - Create the target branch from the remote base branch:
- Take the type with the highest priority across all commits:
revert > fix > feat > perf > refactor > test > docs > style > chore. - Summarize one title from all commit messages.
- Branch names allow ASCII only; always slugify as
{type}/{requirement or feature}-{title}. Translate the requirement and title into a short English phrase first, then calltools/slugify.sh {type} {phrase}to produce the final slug (example: translate a non-English request to English first, then slugify — "export report" → export-report → feat/order-export-report). No spaces, parentheses, colons, or any non-ASCII character.
- Take the type with the highest priority across all commits:
- Run
git push -u origin {target branch}. - Create the PR:
jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}.- Title = branch name.
- Write the description into a temp file first, using
templates/pr-description.md(a Traditional Chinese template; the generated description stays in Traditional Chinese per the STE100 output rule).
- Prerequisite PR blocking: when the description lists a prerequisite Push Request, run
jsc-gitea/tools/gitea.sh pr-depend {owner}/{repo} {this PR number} {prerequisite owner}/{repo} {prerequisite PR number}to add the dependency. Gitea then blocks merging until the prerequisite PR closes. If the API is unavailable, degrade: prefix the PR title withWIP:(Gitea blocks merging natively) and remove it once the prerequisite is done. - Report the PR URL.
Rules
- No template section may stay empty: fill the literal 「無」 when there is no plan page, analyze page, or prerequisite PR.
- Take the plan page and analyze page links from the
jsc-sdlcwiki pages; the analyze link must point at the work package heading anchor. - Branch title summarization (step 3.2) and description drafting MUST run as a sub agent.