MCPcopy Create free account
hub / github.com/anthropics/claude-code / extractDuplicateIssueNumber

Function extractDuplicateIssueNumber

scripts/auto-close-duplicates.ts:49–63  ·  view source on GitHub ↗
(commentBody: string)

Source from the content-addressed store, hash-verified

47}
48
49function extractDuplicateIssueNumber(commentBody: string): number | null {
50 // Try to match #123 format first
51 let match = commentBody.match(/#(\d+)/);
52 if (match) {
53 return parseInt(match[1], 10);
54 }
55
56 // Try to match GitHub issue URL format: https://github.com/owner/repo/issues/123
57 match = commentBody.match(/github\.com\/[^\/]+\/[^\/]+\/issues\/(\d+)/);
58 if (match) {
59 return parseInt(match[1], 10);
60 }
61
62 return null;
63}
64
65
66async function closeIssueAsDuplicate(

Callers 1

autoCloseDuplicatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected