@staff0rd/assist 0.650.0 → 0.652.0
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/commands/sessions/web/bundle.js +330 -333
- package/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.652.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -25888,17 +25888,25 @@ function applyEdit(number, title, body) {
|
|
|
25888
25888
|
}
|
|
25889
25889
|
}
|
|
25890
25890
|
|
|
25891
|
-
// src/commands/prs/
|
|
25891
|
+
// src/commands/prs/formatResolvesReference.ts
|
|
25892
|
+
var SAME_REPO_PATTERN = /^#\d+$/;
|
|
25892
25893
|
function jiraBrowseUrl(key) {
|
|
25893
25894
|
const { site } = loadJson("jira.json");
|
|
25894
25895
|
return site ? `https://${site}/browse/${key}` : key;
|
|
25895
25896
|
}
|
|
25897
|
+
function formatResolvesReference(value) {
|
|
25898
|
+
const trimmed = value.trim();
|
|
25899
|
+
if (SAME_REPO_PATTERN.test(trimmed)) return trimmed;
|
|
25900
|
+
return normalizeGithubIssue(trimmed) ?? jiraBrowseUrl(value);
|
|
25901
|
+
}
|
|
25902
|
+
|
|
25903
|
+
// src/commands/prs/buildPrBody.ts
|
|
25896
25904
|
function renderWhy(why, resolves) {
|
|
25897
25905
|
if (resolves && resolves.length > 0) {
|
|
25898
|
-
const
|
|
25906
|
+
const refs = resolves.map(formatResolvesReference).join(", ");
|
|
25899
25907
|
return `${why}
|
|
25900
25908
|
|
|
25901
|
-
Resolves ${
|
|
25909
|
+
Resolves ${refs}`;
|
|
25902
25910
|
}
|
|
25903
25911
|
return why;
|
|
25904
25912
|
}
|