@aligndottech/cli 0.15.0 → 0.16.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.
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
/** The "owner/repo" a decision came from, or undefined when it did not come from code. */
|
|
18
18
|
export declare function repositoryOf(sourceUrl: string | null | undefined): string | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* A decision rendered the way a human cites one: "align-cli#76"
|
|
20
|
+
* A decision rendered the way a human cites one: "align-cli#76" for code,
|
|
21
|
+
* the ticket key ("ALI-346") for tracker decisions.
|
|
21
22
|
*
|
|
22
23
|
* `repository` already carries the same fact, and the agent still wrote prose naming titles
|
|
23
24
|
* and dates but not repositories - so which repo a decision came from was only discoverable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-links.d.ts","sourceRoot":"","sources":["../../src/lib/decision-links.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkBH,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIrF;
|
|
1
|
+
{"version":3,"file":"decision-links.d.ts","sourceRoot":"","sources":["../../src/lib/decision-links.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkBH,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIrF;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMpF"}
|
|
@@ -37,7 +37,19 @@ export function repositoryOf(sourceUrl) {
|
|
|
37
37
|
return m ? `${m[1]}/${m[2]}` : undefined;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Tracker tickets have their own native cite - the key humans already say out
|
|
41
|
+
* loud ("ALI-346", "PROJ-123") - so those URLs cite by key rather than getting
|
|
42
|
+
* a repo#number invented for them. Deliberately NOT folded into CODE_REF:
|
|
43
|
+
* repositoryOf must keep returning undefined for these, because a Linear
|
|
44
|
+
* workspace is not an owner and a ticket key is not a repository (that refusal
|
|
45
|
+
* is CODE_REF's documented point). The KEY-123 shape is required in full, so a
|
|
46
|
+
* bare word in the issue slot cites nothing.
|
|
47
|
+
*/
|
|
48
|
+
const LINEAR_ISSUE = /^https?:\/\/linear\.app\/[^/\s]+\/issue\/([A-Z][A-Z0-9]*-\d+)(?:[/?#]|$)/;
|
|
49
|
+
const JIRA_ISSUE = /^https?:\/\/[^/\s]+\/browse\/([A-Z][A-Z0-9]*-\d+)(?:[/?#]|$)/;
|
|
50
|
+
/**
|
|
51
|
+
* A decision rendered the way a human cites one: "align-cli#76" for code,
|
|
52
|
+
* the ticket key ("ALI-346") for tracker decisions.
|
|
41
53
|
*
|
|
42
54
|
* `repository` already carries the same fact, and the agent still wrote prose naming titles
|
|
43
55
|
* and dates but not repositories - so which repo a decision came from was only discoverable
|
|
@@ -51,6 +63,9 @@ export function citationFor(sourceUrl) {
|
|
|
51
63
|
if (!sourceUrl)
|
|
52
64
|
return undefined;
|
|
53
65
|
const m = CODE_REF.exec(sourceUrl);
|
|
54
|
-
|
|
66
|
+
if (m)
|
|
67
|
+
return `${m[2]}#${m[3]}`;
|
|
68
|
+
const ticket = LINEAR_ISSUE.exec(sourceUrl) ?? JIRA_ISSUE.exec(sourceUrl);
|
|
69
|
+
return ticket ? ticket[1] : undefined;
|
|
55
70
|
}
|
|
56
71
|
//# sourceMappingURL=decision-links.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-links.js","sourceRoot":"","sources":["../../src/lib/decision-links.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,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