|
14 | 14 |
|
15 | 15 | # The tags and description to use in creating subsets of PRs |
16 | 16 | TAGS_METADATA_BASE = { |
| 17 | + "new": { |
| 18 | + "tags": ["feature", "new"], |
| 19 | + "pre": ["NEW", "FEAT", "FEATURE"], |
| 20 | + "description": "New features added", |
| 21 | + }, |
17 | 22 | "enhancement": { |
18 | | - "tags": ["enhancement", "feature", "enhancements"], |
| 23 | + "tags": ["enhancement", "enhancements"], |
| 24 | + "pre": ["NEW", "ENH", "ENHANCEMENT", "IMPROVE"], |
19 | 25 | "description": "Enhancements made", |
20 | 26 | }, |
21 | | - "bug": {"tags": ["bug", "bugfix", "bugs"], "description": "Bugs fixed",}, |
| 27 | + "bug": { |
| 28 | + "tags": ["bug", "bugfix", "bugs"], |
| 29 | + "pre": ["FIX", "BUG"], |
| 30 | + "description": "Bugs fixed", |
| 31 | + }, |
22 | 32 | "maintenance": { |
23 | 33 | "tags": ["maintenance", "maint"], |
| 34 | + "pre": ["MAINT", "MNT"], |
24 | 35 | "description": "Maintenance and upkeep improvements", |
25 | 36 | }, |
26 | 37 | "documentation": { |
27 | 38 | "tags": ["documentation", "docs", "doc"], |
| 39 | + "pre": ["DOC", "DOCS"], |
28 | 40 | "description": "Documentation improvements", |
29 | 41 | }, |
30 | | - "api_change": {"tags": ["api-change", "apichange"], "description": "API Changes",}, |
| 42 | + "api_change": { |
| 43 | + "tags": ["api-change", "apichange"], |
| 44 | + "pre": ["BREAK", "BREAKING", "BRK", "UPGRADE"], |
| 45 | + "description": "API and Breaking Changes", |
| 46 | + }, |
| 47 | + "deprecate": { |
| 48 | + "tags": ["deprecation", "deprecate"], |
| 49 | + "pre": ["DEPRECATE", "DEPRECATION", "DEP"], |
| 50 | + "description": "Deprecated features", |
| 51 | + }, |
31 | 52 | } |
32 | 53 |
|
33 | 54 |
|
@@ -273,9 +294,16 @@ def generate_activity_md( |
273 | 294 |
|
274 | 295 | # Separate out items by their tag types |
275 | 296 | for kind, kindmeta in tags_metadata.items(): |
| 297 | + # First find the PRs based on tag |
276 | 298 | mask = closed_prs["labels"].map( |
277 | 299 | lambda a: any(ii in jj for ii in kindmeta["tags"] for jj in a) |
278 | 300 | ) |
| 301 | + # Now find PRs based on prefix |
| 302 | + mask_pre = closed_prs["title"].map( |
| 303 | + lambda title: any(f"{ipre}:" in title for ipre in kindmeta["pre"]) |
| 304 | + ) |
| 305 | + mask = mask | mask_pre |
| 306 | + |
279 | 307 | kindmeta["data"] = closed_prs.loc[mask] |
280 | 308 | kindmeta["mask"] = mask |
281 | 309 |
|
|
0 commit comments