(body: string)
| 60 | |
| 61 | // 从 issue 内容中提取图片 |
| 62 | private static extractImageFromBody(body: string): string | undefined { |
| 63 | if (!body) return undefined; |
| 64 | |
| 65 | // 匹配 Markdown 图片  |
| 66 | const markdownImageMatch = body.match(/!\[.*?\]\((https?:\/\/[^)]+\.(?:png|jpg|jpeg|gif|webp))\)/); |
| 67 | if (markdownImageMatch) { |
| 68 | return markdownImageMatch[1]; |
| 69 | } |
| 70 | |
| 71 | // 匹配 HTML 图片标签 <img src="..."> |
| 72 | const htmlImageMatch = body.match(/<img[^>]+src\s*=\s*["'](https?:\/\/[^"']+\.(?:png|jpg|jpeg|gif|webp))["'][^>]*>/); |
| 73 | if (htmlImageMatch) { |
| 74 | return htmlImageMatch[1]; |
| 75 | } |
| 76 | |
| 77 | return undefined; |
| 78 | } |
| 79 | |
| 80 | // 从 issue 内容中提取分类 |
| 81 | private static extractCategoryFromBody(body: string): string | undefined { |
no outgoing calls
no test coverage detected