@henryqw/pi-pr 3.1.4 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/package.json +1 -1
- package/skills/pi-pr-create/SKILL.md +25 -9
package/README.md
CHANGED
|
@@ -68,7 +68,11 @@ Each footer entry is one linked `PR #number` plus one plain-language status: `N
|
|
|
68
68
|
| No-action state | Report the state without taking action. |
|
|
69
69
|
| Merge-ready pull request | Ask for final confirmation, recheck fresh state, and merge directly if confirmed. |
|
|
70
70
|
|
|
71
|
-
`pi-pr-create`
|
|
71
|
+
`pi-pr-create` fetches branches from `origin` and finds the current branch's parent. The parent can be a feature branch. It uses an explicit base when provided. Otherwise, it accepts only a uniquely identifiable parent from reflog and commit history.
|
|
72
|
+
|
|
73
|
+
It merges the parent's captured commit before validation and push. It resolves clear conflicts and stops when the base or conflict intent is ambiguous.
|
|
74
|
+
|
|
75
|
+
It honors an existing configured push target. Without one, it pushes a captured OID to the local branch ref on `origin` and sets upstream.
|
|
72
76
|
|
|
73
77
|
Without a configured push target, discovery checks validated remotes for the same branch ref. One exact open PR becomes an inferred target. `/pr` names the exact `remote/ref` and asks before linking it. The extension revalidates the branch, PR, remote OID, and Git configuration before mutation. It rolls back its upstream and remote-tracking changes if final verification fails.
|
|
74
78
|
|
package/package.json
CHANGED
|
@@ -12,16 +12,32 @@ Never concatenate one into shell syntax. Pass dynamic values through quoted shel
|
|
|
12
12
|
variables. Use `--` before positional Git arguments when the command supports it.
|
|
13
13
|
Never pass a credential-bearing URL to another command or print it.
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
1. Fetch current branch refs from `origin` without tags or submodules. Resolve
|
|
16
|
+
`<base>` from explicit input or the branch's actual parent. The parent may be
|
|
17
|
+
a feature branch; never assume the repository default branch. To infer it,
|
|
18
|
+
inspect branch-creation reflogs and the fetched commit graph, excluding the
|
|
19
|
+
current branch and symbolic refs. Accept history inference only when one
|
|
20
|
+
validated remote branch is uniquely nearest to `HEAD`. Stop and ask for the
|
|
21
|
+
base when evidence is absent or ambiguous. Validate `<base>` with
|
|
22
|
+
`git check-ref-format --branch "$base"`, resolve
|
|
23
|
+
`refs/remotes/origin/${base}` to a full `<base-oid>`, and use only that OID in
|
|
24
|
+
`git merge-base HEAD "$base_oid"` and `git diff "$merge_base" --`. Also
|
|
25
|
+
inspect `git status --short` and staged and unstaged diffs. Never commit
|
|
20
26
|
`.context/` or unrelated changes.
|
|
21
27
|
2. Commit each coherent pending change with a scoped Conventional Commit. Preserve existing coherent staging; stop when changes cannot be separated safely.
|
|
22
|
-
3.
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
3. Require an attached branch and a clean tree, then merge the captured base OID
|
|
29
|
+
with `git merge --no-edit "$base_oid"`. Never merge the mutable branch name.
|
|
30
|
+
If conflicts occur, list only unmerged paths, inspect bounded conflict hunks,
|
|
31
|
+
preserve compatible changes from both sides, and stage each resolved path.
|
|
32
|
+
Regenerate generated files after resolving their sources. If intended behavior
|
|
33
|
+
is unclear, leave the merge pending and ask the user instead of guessing.
|
|
34
|
+
When no unmerged paths remain, run `GIT_EDITOR=true git merge --continue`.
|
|
35
|
+
Never rebase, reset, auto-stash, choose an entire side blindly, or bypass hooks.
|
|
36
|
+
Require `git merge-base --is-ancestor "$base_oid" HEAD` and a clean tree before
|
|
37
|
+
continuing.
|
|
38
|
+
4. Run the smallest relevant non-destructive validation for current `HEAD`; state when none exists.
|
|
39
|
+
5. Derive a Conventional Commit PR title plus Summary and Testing body from the live diff and validation.
|
|
40
|
+
6. Resolve the push destination after validation. Require an attached branch.
|
|
25
41
|
Validate the branch with `git check-ref-format --branch "$branch"`. Capture
|
|
26
42
|
and validate the full `HEAD^{commit}` OID.
|
|
27
43
|
|
|
@@ -67,5 +83,5 @@ Never pass a credential-bearing URL to another command or print it.
|
|
|
67
83
|
Reuse one result only when its base matches. Refresh its title and body.
|
|
68
84
|
Stop on a different base or multiple results. Otherwise create with quoted,
|
|
69
85
|
explicit `--repo`, `--head`, `--base`, title, and body-file arguments.
|
|
70
|
-
|
|
86
|
+
7. Reply only with the already validated PR URL. The extension handles any
|
|
71
87
|
Herdr workspace label update after it discovers the open PR.
|