prr-kit 2.0.0 → 2.0.1
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/package.json
CHANGED
|
@@ -23,11 +23,48 @@ No pre-collected context file needed. Context is always fresh and PR-specific.
|
|
|
23
23
|
## PHASE 1 — SELECT PR
|
|
24
24
|
*Execute steps 1a–1b automatically. Pause only at 1c.*
|
|
25
25
|
|
|
26
|
-
### 1a.
|
|
26
|
+
### 1a. Detect platform and fetch latest
|
|
27
|
+
|
|
28
|
+
**Step 1 — Detect platform** (mandatory, always run):
|
|
29
|
+
```bash
|
|
30
|
+
git -C {target_repo} remote get-url origin
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Map the remote URL to a platform:
|
|
34
|
+
|
|
35
|
+
| Remote URL pattern | Platform |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `github.com` | `github` |
|
|
38
|
+
| `gitlab.com` or self-hosted GitLab | `gitlab` |
|
|
39
|
+
| `dev.azure.com` or `visualstudio.com` | `azure` |
|
|
40
|
+
| `bitbucket.org` | `bitbucket` |
|
|
41
|
+
| No remote / local only | `none` |
|
|
42
|
+
|
|
43
|
+
Set `{detected_platform}` = detected value.
|
|
44
|
+
|
|
45
|
+
If `{platform_repo}` is empty, also extract `{detected_platform_repo}` from the URL:
|
|
46
|
+
- GitHub/GitLab/Bitbucket: extract `owner/repo` (strip `.git` suffix)
|
|
47
|
+
- Azure DevOps: extract `org/project/repo` from `dev.azure.com/{org}/{project}/_git/{repo}` or `{org}.visualstudio.com/{project}/_git/{repo}`
|
|
48
|
+
|
|
49
|
+
Display:
|
|
50
|
+
```
|
|
51
|
+
🔍 Platform detected: {detected_platform}
|
|
52
|
+
Remote: {platform_repo or detected_platform_repo}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If platform cannot be detected, set `{detected_platform}` = `none` and continue.
|
|
56
|
+
|
|
57
|
+
**Step 2 — Fetch latest:**
|
|
27
58
|
```bash
|
|
28
59
|
git -C {target_repo} fetch origin --prune
|
|
29
60
|
```
|
|
30
|
-
|
|
61
|
+
|
|
62
|
+
**If fetch succeeds:** Show `✓ Fetched latest from remote` and proceed.
|
|
63
|
+
|
|
64
|
+
**If fetch fails:**
|
|
65
|
+
- Show the error message
|
|
66
|
+
- Ask user: Retry / Continue with local state / Cancel
|
|
67
|
+
- Wait for response before proceeding
|
|
31
68
|
|
|
32
69
|
### 1b. List open PRs/MRs (primary) + recent branches (secondary)
|
|
33
70
|
|