create-egregore 0.12.1 → 0.12.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 +30 -0
- package/package.json +1 -1
package/lib/local.js
CHANGED
|
@@ -627,6 +627,36 @@ async function localJoinFlow(orgArg, ui) {
|
|
|
627
627
|
: `${orgLogin}-memory`;
|
|
628
628
|
const managedRepos = config.repos || [];
|
|
629
629
|
|
|
630
|
+
// 5b. Check access to memory repo + managed repos (may need invitation acceptance)
|
|
631
|
+
const additionalRepos = [memoryRepoName, ...managedRepos];
|
|
632
|
+
const inaccessible = [];
|
|
633
|
+
for (const repo of additionalRepos) {
|
|
634
|
+
if (!(await repoExists(githubToken, orgLogin, repo))) {
|
|
635
|
+
inaccessible.push(repo);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
if (inaccessible.length > 0) {
|
|
639
|
+
console.log("");
|
|
640
|
+
ui.info(`Accept ${inaccessible.length === 1 ? "the invitation" : "all invitations"} in your browser.`);
|
|
641
|
+
for (const repo of inaccessible) {
|
|
642
|
+
openBrowser(`https://github.com/${orgLogin}/${repo}`);
|
|
643
|
+
}
|
|
644
|
+
await ui.prompt("Press Enter after accepting...");
|
|
645
|
+
|
|
646
|
+
const stillBlocked = [];
|
|
647
|
+
for (const repo of inaccessible) {
|
|
648
|
+
if (!(await repoExists(githubToken, orgLogin, repo))) {
|
|
649
|
+
stillBlocked.push(repo);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (stillBlocked.length > 0) {
|
|
653
|
+
ui.error(`Still can't access: ${stillBlocked.join(", ")}`);
|
|
654
|
+
ui.error("Make sure you've been invited to all repos.");
|
|
655
|
+
process.exit(1);
|
|
656
|
+
}
|
|
657
|
+
ui.success("All repos accessible");
|
|
658
|
+
}
|
|
659
|
+
|
|
630
660
|
// 6. Clone locally
|
|
631
661
|
const base = process.cwd();
|
|
632
662
|
const forkUrl = `https://github.com/${orgLogin}/${repoName}.git`;
|