next-issue 6.6.67 → 6.6.68
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 +1 -1
- package/dist/git.mjs +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -399,7 +399,7 @@ Three levels of console output:
|
|
|
399
399
|
call names the host of the remote url (`--repo <host>/<owner>/<name>`,
|
|
400
400
|
`gh api --hostname <host>`) when it is not `github.com`, so `gh` must be
|
|
401
401
|
logged in to that host. For an ssh url the harness reads the real host of an
|
|
402
|
-
ssh alias with `ssh -G`. Other hosts, such as GitLab, are not supported.
|
|
402
|
+
ssh alias with `ssh -G`. The host `ssh.github.com` (GitHub's ssh over port 443) means `github.com`. Other hosts, such as GitLab, are not supported.
|
|
403
403
|
- pi, logged in to a model provider. The agents use the model, the thinking
|
|
404
404
|
level, the extensions and the skills from your pi settings, except the
|
|
405
405
|
extension and the skills of `pi-next-issue`. The implementer and the fixer
|
package/dist/git.mjs
CHANGED
|
@@ -6,12 +6,17 @@ const REMOTE_PATTERNS = [
|
|
|
6
6
|
/^ssh:\/\/(?:[^@/]+@)?(?<host>[^@/:]+)(?::\d+)?\/(?<owner>[^/]+)\/(?<name>[^/]+?)(?:\.git)?\/?$/,
|
|
7
7
|
/^https?:\/\/(?:[^@/]+@)?(?<host>[^@/:]+)(?::\d+)?\/(?<owner>[^/]+)\/(?<name>[^/]+?)(?:\.git)?\/?$/,
|
|
8
8
|
];
|
|
9
|
+
const GITHUB_SSH_HOST = 'ssh.github.com';
|
|
10
|
+
function githubHost(host) {
|
|
11
|
+
const lower = host.toLowerCase();
|
|
12
|
+
return lower === GITHUB_SSH_HOST ? 'github.com' : lower;
|
|
13
|
+
}
|
|
9
14
|
export function parseRemote(url) {
|
|
10
15
|
for (const pattern of REMOTE_PATTERNS) {
|
|
11
16
|
const match = pattern.exec(url.trim());
|
|
12
17
|
if (match?.groups) {
|
|
13
18
|
return {
|
|
14
|
-
host: match.groups.host
|
|
19
|
+
host: githubHost(match.groups.host),
|
|
15
20
|
owner: match.groups.owner,
|
|
16
21
|
name: match.groups.name,
|
|
17
22
|
};
|
|
@@ -26,7 +31,7 @@ async function sshHost(url, host) {
|
|
|
26
31
|
const result = await run('ssh', ['-G', host]).catch(() => undefined);
|
|
27
32
|
const resolved = /^hostname[^\S\r\n]+(\S+)$/m.exec(result?.stdout ?? '')?.[1];
|
|
28
33
|
return result !== undefined && succeeded(result) && resolved !== undefined
|
|
29
|
-
? resolved
|
|
34
|
+
? githubHost(resolved)
|
|
30
35
|
: host;
|
|
31
36
|
}
|
|
32
37
|
export async function repoRoot(cwd) {
|