(subject: ParsedSubject)
| 278 | } |
| 279 | |
| 280 | export function categorizeCommit(subject: ParsedSubject) { |
| 281 | if (subject.breaking) { |
| 282 | return "Breaking Changes"; |
| 283 | } |
| 284 | |
| 285 | if (isCatalogChange(subject)) { |
| 286 | return "Catalog"; |
| 287 | } |
| 288 | |
| 289 | return knownCategoryFor(subject) ?? "Other Changes"; |
| 290 | } |
| 291 | |
| 292 | function isCatalogChange(subject: ParsedSubject) { |
| 293 | const normalizedScope = subject.scope?.toLowerCase() ?? ""; |
no test coverage detected