Skip to content

Conversation

@igorpecovnik
Copy link
Member

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Apr 17, 2025

Walkthrough

This change introduces a comprehensive GitHub labeling automation system for the repository. Four new files are added: .github/labeler.yml defines rules mapping file path patterns to labels for automated pull request labeling; .github/labels.yml specifies 38 labels with names, colors, and descriptions for issues and PRs; .github/workflows/labels-from-yml.yml adds a workflow to synchronize repository labels with the YAML configuration, triggered by changes to the labels file or manual dispatch; and .github/workflows/pr-auto-labeler.yml implements a workflow to automatically label pull requests based on file changes, PR size, and creation date, and to remove the "Ready to merge" label when appropriate. The automation leverages third-party GitHub Actions and the GitHub CLI, and is conditioned to run only for the "Armbian" repository owner.

Suggested labels

ready to merge

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@igorpecovnik igorpecovnik merged commit 743d305 into main Apr 17, 2025
1 of 2 checks passed
Copy link

@coderabbitai coderabbitai bot left a 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‑readable run-name for 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
The actions/labeler@v5 step relies on its default config path; explicitly adding a config-file: .github/labeler.yml input can prevent surprises and improve maintainability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a945e30 and 9b594eb.

📒 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 of crazy-max/ghaction-github-labeler@v5 are all appropriate for synchronizing your .github/labels.yml definitions.

.github/workflows/pr-auto-labeler.yml (1)

11-11: Security: review use of pull_request_target
The pull_request_target event 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 to pull_request if full isolation is required.

Comment on lines +13 to +37
"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/**/*']

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

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/labeler expects, 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)

Comment on lines +67 to +76
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
sizes: >
{
"0": "small",
"50": "medium",
"250": "large"
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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"
   }

@leggewie leggewie deleted the gha branch April 25, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants