diff --git a/scripts/auto-close-duplicates.ts b/scripts/auto-close-duplicates.ts index 0cee40a..2ad3bd3 100644 --- a/scripts/auto-close-duplicates.ts +++ b/scripts/auto-close-duplicates.ts @@ -47,8 +47,19 @@ async function githubRequest(endpoint: string, token: string, method: string } function extractDuplicateIssueNumber(commentBody: string): number | null { - const match = commentBody.match(/#(\d+)/); - return match ? parseInt(match[1], 10) : null; + // Try to match #123 format first + let match = commentBody.match(/#(\d+)/); + if (match) { + return parseInt(match[1], 10); + } + + // Try to match GitHub issue URL format: https://github.com/owner/repo/issues/123 + match = commentBody.match(/github\.com\/[^\/]+\/[^\/]+\/issues\/(\d+)/); + if (match) { + return parseInt(match[1], 10); + } + + return null; }