ai-agentmanager 1.0.2 → 1.2.1

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/src/tracker.js CHANGED
@@ -95,6 +95,12 @@ export function bugFromRef(ref, source) {
95
95
  return { key: ref, url: null, source };
96
96
  }
97
97
 
98
+ /** The Jira key when the text starts with a Jira link ("https://x.atlassian.net/browse/ABC-1 fix it" → "ABC-1"). */
99
+ export function leadingJiraKey(text) {
100
+ const first = String(text ?? '').trimStart().match(/^<?(https?:\/\/\S+)/);
101
+ return first?.[1].match(JIRA_KEY)?.[1] ?? null;
102
+ }
103
+
98
104
  /** Extract PR and bug references from free text. */
99
105
  export function extractRefs(text, bugPatterns = []) {
100
106
  const prs = [];