Skip to content

Commit 8e97030

Browse files
Willemclaude
andcommitted
fix(issues): await the GHE/ssh-alias host check in Planboard calls (#1523)
The sync isGitHubRemote returns false for an ssh alias until its ssh -G lookup lands, so the first Planboard call on such a remote reported "not a GitHub repo". Every caller here is already async. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 0c72b57 commit 8e97030

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎electron/issues.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
gitTry,
1010
ghTryAsync,
1111
GH_TIMEOUT_MS,
12-
isGitHubRemote,
12+
isGitHubRemoteAsync,
1313
isGhAuthFailure,
1414
tailErr,
1515
} = require("./worktrees.js");
@@ -213,7 +213,7 @@ async function fetchIssue(projectPath, ref, opts) {
213213
return { ok: false, reason: "not a GitHub repo" };
214214
}
215215
const originUrl = String(remote.stdout || "").trim();
216-
if (!isGitHubRemote(originUrl)) {
216+
if (!(await isGitHubRemoteAsync(originUrl))) {
217217
return { ok: false, reason: "not a GitHub repo" };
218218
}
219219

@@ -427,7 +427,7 @@ async function setPlanStatus(projectPath, number, status) {
427427
}
428428

429429
const remote = gitTry(cwd, ["remote", "get-url", "origin"]);
430-
if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) {
430+
if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) {
431431
return { ok: false, reason: "not a GitHub repo" };
432432
}
433433

@@ -472,7 +472,7 @@ async function reopenIssue(projectPath, number, opts) {
472472
}
473473

474474
const remote = gitTry(cwd, ["remote", "get-url", "origin"]);
475-
if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) {
475+
if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) {
476476
return { ok: false, reason: "not a GitHub repo" };
477477
}
478478

@@ -532,7 +532,7 @@ async function completeIssue(projectPath, number, opts) {
532532
}
533533

534534
const remote = gitTry(cwd, ["remote", "get-url", "origin"]);
535-
if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) {
535+
if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) {
536536
return { ok: false, reason: "not a GitHub repo" };
537537
}
538538

@@ -598,7 +598,7 @@ async function commentIssue(projectPath, number, body) {
598598
if (!text) return { ok: false, reason: "empty comment" };
599599

600600
const remote = gitTry(cwd, ["remote", "get-url", "origin"]);
601-
if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) {
601+
if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) {
602602
return { ok: false, reason: "not a GitHub repo" };
603603
}
604604

@@ -644,7 +644,7 @@ async function createIssue(projectPath, input) {
644644
if (!cwd) return { ok: false, reason: "not a GitHub repo" };
645645

646646
const remote = gitTry(cwd, ["remote", "get-url", "origin"]);
647-
if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) {
647+
if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) {
648648
return { ok: false, reason: "not a GitHub repo" };
649649
}
650650

0 commit comments

Comments
 (0)