next-issue 6.6.83 → 6.6.84
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/agent-reply.mjs +3 -1
- package/package.json +1 -1
package/dist/agent-reply.mjs
CHANGED
|
@@ -11,6 +11,7 @@ export function parseResolved(text) {
|
|
|
11
11
|
return note === undefined || PLACEHOLDERS.has(note.toLowerCase()) ? undefined : note;
|
|
12
12
|
}
|
|
13
13
|
const CLOSING_REFERENCE = /(\s*[,;]?\s*(?:and\s+)?)\b(close[sd]?|fix(?:e[sd])?|resolve[sd]?)(\s*:\s*|\s+)(?:[\w.-]+\/[\w.-]+#\d+|#\d+|https?:\/\/\S+\/(?:issues|pull)\/\d+)/gi;
|
|
14
|
+
const BARE_TYPE = /^\w+(?:\([^)]*\))?!?$/;
|
|
14
15
|
export function withoutClosingReferences(subject, fallback) {
|
|
15
16
|
const cleaned = subject
|
|
16
17
|
.replace(CLOSING_REFERENCE, (_match, _lead, keyword, separator, offset) => offset === 0 && separator.includes(':') ? `${keyword}: ` : '')
|
|
@@ -18,7 +19,8 @@ export function withoutClosingReferences(subject, fallback) {
|
|
|
18
19
|
.replace(/\s+/g, ' ')
|
|
19
20
|
.replace(/[\s,;:]+$/, '')
|
|
20
21
|
.trim();
|
|
21
|
-
|
|
22
|
+
const onlyType = subject.search(CLOSING_REFERENCE) !== -1 && BARE_TYPE.test(cleaned);
|
|
23
|
+
return cleaned && !onlyType ? cleaned : fallback;
|
|
22
24
|
}
|
|
23
25
|
export function parseCommitSubject(text, fallback) {
|
|
24
26
|
const subject = lastMatch(text, /^commit:[^\S\r\n]*(.*)$/gim)
|