create-egregore 0.14.1 → 0.14.2
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/lib/local.js +20 -8
- package/package.json +1 -1
package/lib/local.js
CHANGED
|
@@ -644,17 +644,29 @@ async function localJoinFlow(orgArg, ui) {
|
|
|
644
644
|
: `${orgLogin}-memory`;
|
|
645
645
|
const managedRepos = config.repos || [];
|
|
646
646
|
|
|
647
|
-
// 5b. Check access to
|
|
648
|
-
|
|
647
|
+
// 5b. Check access to ALL repos — open browser for any that need invitation acceptance
|
|
648
|
+
const allRepos = [repoName, memoryRepoName, ...managedRepos];
|
|
649
|
+
const inaccessible = [];
|
|
650
|
+
for (const repo of allRepos) {
|
|
651
|
+
if (!(await repoExists(githubToken, orgLogin, repo))) {
|
|
652
|
+
inaccessible.push(repo);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if (inaccessible.length > 0) {
|
|
649
656
|
console.log("");
|
|
650
|
-
ui.info(
|
|
651
|
-
|
|
657
|
+
ui.info(`Accept ${inaccessible.length === 1 ? "the invitation" : `${inaccessible.length} invitations`} in your browser.`);
|
|
658
|
+
for (const repo of inaccessible) {
|
|
659
|
+
openBrowser(`https://github.com/${orgLogin}/${repo}`);
|
|
660
|
+
}
|
|
652
661
|
await ui.prompt("Press Enter after accepting...");
|
|
653
662
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
663
|
+
// Retry — only block on main + memory, managed repos are best-effort
|
|
664
|
+
for (const repo of [repoName, memoryRepoName]) {
|
|
665
|
+
if (inaccessible.includes(repo) && !(await repoExists(githubToken, orgLogin, repo))) {
|
|
666
|
+
ui.error(`Still can't access ${orgLogin}/${repo}`);
|
|
667
|
+
ui.error("Make sure the org admin has set up Egregore and invited you.");
|
|
668
|
+
process.exit(1);
|
|
669
|
+
}
|
|
658
670
|
}
|
|
659
671
|
ui.success("Access confirmed");
|
|
660
672
|
}
|