@toast-ninja/toast-cli 0.1.3 → 0.1.4
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 +2 -2
- package/package.json +1 -1
- package/skills/review-ci/SKILL.md +2 -2
- package/src/cli.js +8 -8
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ That token must be a user token that can prove active membership in the org.
|
|
|
52
52
|
GitHub Actions' repository `GITHUB_TOKEN` is not a user login token; use
|
|
53
53
|
`TOAST_TOKEN` in CI.
|
|
54
54
|
|
|
55
|
-
The older `toast review-ci auth --repo
|
|
55
|
+
The older `toast review-ci auth --repo ORG/REPO` command still works as a
|
|
56
56
|
compatibility alias.
|
|
57
57
|
|
|
58
58
|
## Review CI
|
|
@@ -106,7 +106,7 @@ toast review-ci instructions
|
|
|
106
106
|
Before using `gh` to rediscover review context, run:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
toast review-ci next --repo
|
|
109
|
+
toast review-ci next --repo ORG/REPO --pr NUMBER --head HEAD_SHA
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
Fix every unresolved thread/comment listed by URL. Reply with what changed,
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ Use Toast Review CI before rediscovering review context with `gh`.
|
|
|
10
10
|
1. Run:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
toast review-ci next --repo
|
|
13
|
+
toast review-ci next --repo ORG/REPO --pr NUMBER --head HEAD_SHA
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
2. Fix every `blocking_items` entry. Prefer the URL and body from Toast over a fresh GitHub search.
|
|
@@ -19,7 +19,7 @@ toast review-ci next --repo OWNER/REPO --pr NUMBER --head HEAD_SHA
|
|
|
19
19
|
5. Push the fix, then wait on the exact new head:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
toast review-ci wait --repo
|
|
22
|
+
toast review-ci wait --repo ORG/REPO --pr NUMBER --head HEAD_SHA
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Only report completion after Review CI returns `acknowledged`.
|
package/src/cli.js
CHANGED
|
@@ -65,7 +65,7 @@ const parseRepo = repoFullName => {
|
|
|
65
65
|
const [owner, repo] = parts
|
|
66
66
|
|
|
67
67
|
if (parts.length !== 2 || !owner || !repo) {
|
|
68
|
-
throw new Error('--repo must be
|
|
68
|
+
throw new Error('--repo must be ORG/REPO')
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
return { owner, repo, fullName: `${owner}/${repo}` }
|
|
@@ -77,7 +77,7 @@ const parseOrg = org => {
|
|
|
77
77
|
const normalizedOrg = String(org || '').trim()
|
|
78
78
|
|
|
79
79
|
if (!normalizedOrg || normalizedOrg.includes('/')) {
|
|
80
|
-
throw new Error('--org must be a GitHub organization
|
|
80
|
+
throw new Error('--org must be a GitHub organization name')
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
return normalizedOrg
|
|
@@ -85,14 +85,14 @@ const parseOrg = org => {
|
|
|
85
85
|
|
|
86
86
|
const parseGithubRemoteUrl = remoteUrl => {
|
|
87
87
|
const value = String(remoteUrl || '').trim()
|
|
88
|
-
const sshMatch = value.match(/^
|
|
88
|
+
const sshMatch = value.match(/^[^@/:]+@[^:]+:([^/]+)\/([^/]+?)(?:\.git)?$/)
|
|
89
89
|
|
|
90
90
|
if (sshMatch) return parseRepo(`${sshMatch[1]}/${sshMatch[2]}`)
|
|
91
91
|
|
|
92
92
|
try {
|
|
93
93
|
const url = new URL(value)
|
|
94
94
|
|
|
95
|
-
if (
|
|
95
|
+
if (!['git:', 'http:', 'https:', 'ssh:'].includes(url.protocol)) return null
|
|
96
96
|
|
|
97
97
|
const parts = url.pathname
|
|
98
98
|
.replace(/^\/+/, '')
|
|
@@ -677,10 +677,10 @@ const handleInstructions = async context => {
|
|
|
677
677
|
const printHelp = stdout => {
|
|
678
678
|
stdout.write(`Usage:
|
|
679
679
|
toast auth [--org ORG] [--device|--github-token TOKEN]
|
|
680
|
-
toast review-ci auth --repo
|
|
681
|
-
toast review-ci status --repo
|
|
682
|
-
toast review-ci next --repo
|
|
683
|
-
toast review-ci wait --repo
|
|
680
|
+
toast review-ci auth --repo ORG/REPO [--device|--github-token TOKEN]
|
|
681
|
+
toast review-ci status --repo ORG/REPO --pr NUMBER --head SHA
|
|
682
|
+
toast review-ci next --repo ORG/REPO --pr NUMBER --head SHA
|
|
683
|
+
toast review-ci wait --repo ORG/REPO --pr NUMBER --head SHA
|
|
684
684
|
toast review-ci instructions [--install-codex]
|
|
685
685
|
`)
|
|
686
686
|
}
|