diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 1114e72..0609e2c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-git", - "version": "0.0.3", + "version": "0.0.4", "description": "Commit 分組認可與 Push Request 建立", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 35a8ded..24858a1 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-git", - "version": "0.0.3", + "version": "0.0.4", "description": "Commit 分組認可與 Push Request 建立", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index e6a0f04..9a478df 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-git", - "version": "0.0.3", + "version": "0.0.4", "description": "Commit 分組認可與 Push Request 建立", "skills": "./skills/" } diff --git a/skills/pr/SKILL.md b/skills/pr/SKILL.md index c8b27d2..5911714 100644 --- a/skills/pr/SKILL.md +++ b/skills/pr/SKILL.md @@ -1,6 +1,6 @@ --- name: pr -description: 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. Branch priority is revert > fix > feat > perf > refactor > test > docs > style > chore. Use when work is ready for review; not for plain commits. +description: 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 @@ -8,7 +8,7 @@ description: Commit all changes via jsc-git:commit, create a target branch named ## Steps 1. Call `jsc-git:commit` to commit every file change first. -2. Pick the base branch: use `develop` when it exists on the remote, else `main`, else `master`. +2. Pick the base branch. **A base branch passed in by the caller wins over everything else** — `jsc-sdlc:implement` passes the analysis page's source branch, and silently retargeting that PR at `develop` would merge a single work package straight past the feature branch it belongs to. Only when no caller supplied one: use `develop` when it exists on the remote, else `main`, else `master`. Verify the chosen base exists on the remote (`git fetch --prune origin` first, then `git branch -r`); it does not exist → report and stop, never fall back silently. 3. Create the target branch from the remote base branch: 1. Take the type with the highest priority across all commits: `revert > fix > feat > perf > refactor > test > docs > style > chore`. 2. Summarize one title from all commit messages.