-
-
Notifications
You must be signed in to change notification settings - Fork 2
GHA - copy labels actions from build repository #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis change introduces a comprehensive GitHub labeling automation system for the repository. Four new files are added: Suggested labels
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
.github/labels.yml (1)
49-57: Nit: Fix grammar in size label descriptions
Several descriptions use “less then” and “more then,” which should be “less than” and “more than.” For example:- description: "PR with less then 50 lines" + description: "PR with less than 50 lines" - description: "PR with more then 50 and less then 250 lines" + description: "PR with more than 50 and less than 250 lines".github/labeler.yml (2)
20-21: YAML lint: insert spaces after commas
Add a space after each comma in your inline lists to comply with YAML style guidelines and improve readability. For example:- any-glob-to-any-file: ['patch/**/*','config/**/*'] + any-glob-to-any-file: ['patch/**/*', 'config/**/*'] - any-glob-to-any-file: ['lib/**/*','tools/**/*','config/cli/**/*','extensions/**/*'] + any-glob-to-any-file: ['lib/**/*', 'tools/**/*', 'config/cli/**/*', 'extensions/**/*']Also applies to: 26-26
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 20-20: too few spaces after comma
(commas)
[warning] 21-21: too few spaces after comma
(commas)
[warning] 21-21: too few spaces after comma
(commas)
58-58: YAML lint: remove trailing whitespace
There's trailing space(s) at the end of this line—please remove them to satisfy YAML formatting rules..github/workflows/labels-from-yml.yml (1)
2-2: Consistency: 'YML' vs 'YAML' in run‑name
Consider using 'YAML' rather than 'YML' in the human‑readablerun-namefor clarity and consistency, e.g.:run-name: Sync Labels from YAML on ${{ github.event_name }}.github/workflows/pr-auto-labeler.yml (1)
49-55: Refine the labeler step for clarity
Theactions/labeler@v5step relies on its default config path; explicitly adding aconfig-file: .github/labeler.ymlinput can prevent surprises and improve maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/labeler.yml(1 hunks).github/labels.yml(1 hunks).github/workflows/labels-from-yml.yml(1 hunks).github/workflows/pr-auto-labeler.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/labeler.yml
[warning] 20-20: too few spaces after comma
(commas)
[warning] 21-21: too few spaces after comma
(commas)
[warning] 21-21: too few spaces after comma
(commas)
[warning] 26-26: too few spaces after comma
(commas)
[warning] 26-26: too few spaces after comma
(commas)
[warning] 26-26: too few spaces after comma
(commas)
[error] 54-54: trailing spaces
(trailing-spaces)
🔇 Additional comments (3)
.github/labels.yml (1)
1-12: Comprehensive and clear label definitions
The labels file is well‑organized, and the milestone, state, type, and scope labels cover the project’s needs effectively..github/workflows/labels-from-yml.yml (1)
1-14: Well‑structured label‑sync workflow
Triggers (manual dispatch, pushes and PRs touching the labels file), scoped permissions, and use ofcrazy-max/ghaction-github-labeler@v5are all appropriate for synchronizing your.github/labels.ymldefinitions..github/workflows/pr-auto-labeler.yml (1)
11-11: Security: review use ofpull_request_target
Thepull_request_targetevent runs in the context of the base (trusted) branch while potentially checking out untrusted PR content. Please confirm that no steps expose secrets or execute arbitrary PR code. You may consider switching topull_requestif full isolation is required.
| "Needs review": | ||
| - changed-files: | ||
| - any-glob-to-any-file: '**' | ||
|
|
||
| "Hardware": | ||
| - all: | ||
| - changed-files: | ||
| - any-glob-to-any-file: ['patch/**/*','config/**/*'] | ||
| - all-globs-to-all-files: ['!config/cli/**/*','!config/desktop/**/*','!config/distributions/**/*'] | ||
|
|
||
| "Framework": | ||
| - all: | ||
| - changed-files: | ||
| - any-glob-to-any-file: ['lib/**/*','tools/**/*','config/cli/**/*','extensions/**/*'] | ||
|
|
||
| "BSP": | ||
| - all: | ||
| - changed-files: | ||
| - any-glob-to-any-file: ['packages/**/*'] | ||
|
|
||
| "GitHub Actions": | ||
| - all: | ||
| - changed-files: | ||
| - any-glob-to-any-file: ['.github/workflows/**/*'] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Labeler config incompatible with actions/labeler@v5
The structure here (using changed-files, all, any-glob-to-any-file, etc.) matches the crazy-max/ghaction-github-labeler action, not the official actions/labeler you invoke in pr-auto-labeler.yml. As a result, no labels will actually be applied. You should either:
- Switch the category‑labeling job to use
crazy-max/ghaction-github-labeler@v5(and its syntax), or - Flatten this to the simple pattern list format that
actions/labelerexpects, for example:"Hardware": - 'patch/**/*' - 'config/**/*' - '!config/cli/**/*' - '!config/desktop/**/*' - '!config/distributions/**/*'
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 20-20: too few spaces after comma
(commas)
[warning] 21-21: too few spaces after comma
(commas)
[warning] 21-21: too few spaces after comma
(commas)
[warning] 26-26: too few spaces after comma
(commas)
[warning] 26-26: too few spaces after comma
(commas)
[warning] 26-26: too few spaces after comma
(commas)
| env: | ||
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
| with: | ||
| sizes: > | ||
| { | ||
| "0": "small", | ||
| "50": "medium", | ||
| "250": "large" | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatch between size labels and configured labels
The pascalgn/size-label-action mapping currently uses "small", "medium", and "large", but your .github/labels.yml defines labels size/small, size/medium, and size/large. This discrepancy will prevent any size labels from being applied. Please update the JSON mapping to match exactly:
sizes: >
{
- "0": "small",
- "50": "medium",
- "250": "large"
+ "0": "size/small",
+ "50": "size/medium",
+ "250": "size/large"
}
No description provided.