@cosmicstack/mercury-agent 0.3.3 → 0.3.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/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,7 +79,7 @@ function getDefaultConfig() {
|
|
|
79
79
|
},
|
|
80
80
|
github: {
|
|
81
81
|
username: getEnv("GITHUB_USERNAME", ""),
|
|
82
|
-
email: getEnv("GITHUB_EMAIL", ""),
|
|
82
|
+
email: getEnv("GITHUB_EMAIL", "mercury@cosmicstack.org"),
|
|
83
83
|
defaultOwner: getEnv("GITHUB_DEFAULT_OWNER", ""),
|
|
84
84
|
defaultRepo: getEnv("GITHUB_DEFAULT_REPO", "")
|
|
85
85
|
},
|
|
@@ -4781,10 +4781,9 @@ async function configure(existingConfig) {
|
|
|
4781
4781
|
const ghUserCurrent = isReconfig && config.github.username ? ` [${config.github.username}]` : "";
|
|
4782
4782
|
const ghUsername = await ask(chalk6.white(` 1. Your GitHub username${ghUserCurrent}: `));
|
|
4783
4783
|
if (ghUsername) config.github.username = ghUsername;
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
if (ghEmail) config.github.email = ghEmail;
|
|
4784
|
+
if (!config.github.email) {
|
|
4785
|
+
config.github.email = "mercury@cosmicstack.org";
|
|
4786
|
+
}
|
|
4788
4787
|
console.log("");
|
|
4789
4788
|
console.log(chalk6.dim(" You need a Personal Access Token (PAT) with repo access."));
|
|
4790
4789
|
console.log(chalk6.dim(" Fine-grained (recommended): github.com/settings/personal-access-tokens/new"));
|
|
@@ -4792,7 +4791,7 @@ async function configure(existingConfig) {
|
|
|
4792
4791
|
console.log(chalk6.dim(" Classic: github.com/settings/tokens/new"));
|
|
4793
4792
|
console.log(chalk6.dim(" \u2192 Scope: repo (full control)"));
|
|
4794
4793
|
const ghTokenCurrent = process.env.GITHUB_TOKEN ? ` [${maskKey(process.env.GITHUB_TOKEN)}]` : "";
|
|
4795
|
-
const ghToken = await ask(chalk6.white(`
|
|
4794
|
+
const ghToken = await ask(chalk6.white(` 2. GitHub PAT${ghTokenCurrent}: `));
|
|
4796
4795
|
if (ghToken) {
|
|
4797
4796
|
appendToEnv("GITHUB_TOKEN", ghToken);
|
|
4798
4797
|
}
|
|
@@ -4803,7 +4802,7 @@ async function configure(existingConfig) {
|
|
|
4803
4802
|
console.log(chalk6.dim(" Example: hotheadhacker/mercury-agent"));
|
|
4804
4803
|
console.log(chalk6.dim(" Example: https://github.com/hotheadhacker/mercury-agent"));
|
|
4805
4804
|
const ghOwnerCurrent = isReconfig && config.github.defaultOwner ? ` [${config.github.defaultOwner}/${config.github.defaultRepo}]` : "";
|
|
4806
|
-
const ghRepoInput = await ask(chalk6.white(`
|
|
4805
|
+
const ghRepoInput = await ask(chalk6.white(` 3. Default repo${ghOwnerCurrent}: `));
|
|
4807
4806
|
if (ghRepoInput) {
|
|
4808
4807
|
const parsed = parseGithubRepo(ghRepoInput);
|
|
4809
4808
|
if (parsed) {
|