(body: string)
| 79 | |
| 80 | // 从 issue 内容中提取分类 |
| 81 | private static extractCategoryFromBody(body: string): string | undefined { |
| 82 | if (!body) return undefined; |
| 83 | |
| 84 | // 匹配标题中的分类标记,如 【动画】、【布局】等 |
| 85 | const categoryMatch = body.match(/【([^】]+)】/); |
| 86 | if (categoryMatch) { |
| 87 | return categoryMatch[1]; |
| 88 | } |
| 89 | |
| 90 | // 匹配标签中的分类 |
| 91 | const tagMatch = body.match(/标签[::]\s*([^\n\r]+)/); |
| 92 | if (tagMatch) { |
| 93 | return tagMatch[1].trim(); |
| 94 | } |
| 95 | |
| 96 | return undefined; |
| 97 | } |
| 98 | |
| 99 | // 转换 GitHub issue 为文章格式 |
| 100 | private static transformIssueToArticle(issue: GitHubIssue): Article { |
no outgoing calls
no test coverage detected