[Repo] Cap package labels and infer type labels - #3574
Merged
Conversation
adamziel
marked this pull request as ready for review
May 4, 2026 12:47
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the PR auto-labeling workflow to cap [Package][...] labels to the top 3 packages by churn and to infer a single [Type] label from conventional-commit PR title prefixes, while keeping actions/labeler focused on uncapped path-based labels.
Changes:
- Split labeling into two jobs: path-based labeling via
actions/labeler, and custom package/type labeling viaactions/github-script. - Removed
[Package][...]rules from.github/labeler.ymland documented the new responsibilities. - Added package ranking (by additions+deletions, then file count) and
[Type]inference rules based on PR title prefix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/auto-label-prs.yml | Adds a custom job to cap package labels and infer a [Type] label; renames the existing labeler job to paths. |
| .github/labeler.yml | Removes package label rules and narrows labeler.yml’s scope to uncapped, path-inferable labels. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -25,7 +35,7 @@ permissions: | |||
| pull-requests: write | |||
Comment on lines
+94
to
+98
| const TYPE_RULES = [ | ||
| [/^fix(\(|:)/i, '[Type] Bug'], | ||
| [/^feat(ure)?(\(|:)/i, '[Type] Enhancement'], | ||
| [/^perf(\(|:)/i, '[Type] Performance'], | ||
| [/^docs(\(|:)/i, '[Type] Documentation'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Caps auto-applied
[Package][...]labels to the top 3 packages by changedlines, and keeps
actions/labelerfocused on path labels that do not need acap:
[Aspect],[Focus],[Feature], and[Type] Documentation.The workflow also infers one
[Type]label from an unambiguousconventional-commit PR title prefix such as
fix:,feat:,perf:, ordocs:.Rationale
The old path-only package rules applied every matching package label. Wide
refactors could produce a wall of
[Package]labels, which made the labels lessuseful for scanning and triage.
[Type]labels are not reliably inferable from paths, but the PR title prefixis a useful signal when it maps cleanly to one existing label.
Implementation
Removed
[Package][...]rules from.github/labeler.ymland added apackage-and-typejob to.github/workflows/auto-label-prs.yml.The new job uses
actions/github-scriptto:additions + deletions, then file count.[Type]label when the PR title prefix is unambiguous.Testing instructions
Validated locally with:
Note: the commit hook attempted
nx format --fix --parallel --uncommitted, butthis checkout does not have Nx modules installed, so that hook check could not
run locally.