mergestorm 0.3.56 → 0.3.57
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 +2 -2
- package/dist/commands/issue.js +13 -1
- package/dist/ui/banner.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,12 +45,12 @@ On a TTY, bare `mergestorm` (or `mergestorm shell`) opens a branded REPL: a comp
|
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
48
|
-
│ ▀▀▀▀▀▀▀▀▀▀▘ mergestorm v0.3.
|
|
48
|
+
│ ▀▀▀▀▀▀▀▀▀▀▘ mergestorm v0.3.57 │
|
|
49
49
|
│ ▀▀▀▀▀▀▀▀▀ ● msk_live_… · maelstrom │
|
|
50
50
|
│ ▀▀▀▀▀▀ [████████░░░░░░░░░░░░░░░░░░░░░░] 25% used │
|
|
51
51
|
│ ▝▀▀▀▀▀ local reviews + stacked PRs · mergestorm.ai │
|
|
52
52
|
│ ▝▀▀▘ review a diff · usage for tabs · /help for all commands │
|
|
53
|
-
│ ▀ New in v0.3.
|
|
53
|
+
│ ▀ New in v0.3.57: issue create --help shows the usage │
|
|
54
54
|
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
55
55
|
mergestorm
|
|
56
56
|
╭──────────────────────────────────────────────────────────────────────────────╮
|
package/dist/commands/issue.js
CHANGED
|
@@ -9,6 +9,7 @@ export const ISSUE_USAGE = [
|
|
|
9
9
|
" Opens a GitHub issue through Mergestorm as the Surge App. Needs no gh and no GitHub login.",
|
|
10
10
|
" Uses existing labels only. Running it again with the same title returns the open issue it already made when that issue is among the newest 100 open issues; an older one, or two calls at once, can still create a duplicate.",
|
|
11
11
|
].join("\n");
|
|
12
|
+
const VALUE_FLAGS = new Set(["--title", "--body", "--body-file", "--label", "--repo"]);
|
|
12
13
|
function usage(message) {
|
|
13
14
|
return new CommandError(message ? `${message}\n${ISSUE_USAGE}` : ISSUE_USAGE, REVIEW_EXIT.usage, "usage");
|
|
14
15
|
}
|
|
@@ -65,7 +66,18 @@ export function parseIssueCreateArgs(args, readBody = (path) => readFileSync(pat
|
|
|
65
66
|
}
|
|
66
67
|
export async function cmdIssue(args, deps = {}) {
|
|
67
68
|
const sub = args[0]?.toLowerCase();
|
|
68
|
-
|
|
69
|
+
const asksForHelp = (arg) => arg === "-h" || arg === "--help" || arg === "help";
|
|
70
|
+
const createAsksForHelp = (rest) => {
|
|
71
|
+
for (let i = 0; i < rest.length; i++) {
|
|
72
|
+
const arg = rest[i];
|
|
73
|
+
if (asksForHelp(arg))
|
|
74
|
+
return true;
|
|
75
|
+
if (VALUE_FLAGS.has(arg))
|
|
76
|
+
i++;
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
};
|
|
80
|
+
if (!sub || asksForHelp(sub) || (sub === "create" && createAsksForHelp(args.slice(1)))) {
|
|
69
81
|
console.log(ISSUE_USAGE);
|
|
70
82
|
return;
|
|
71
83
|
}
|
package/dist/ui/banner.js
CHANGED
package/package.json
CHANGED