-
Notifications
You must be signed in to change notification settings - Fork 58
PR Labeling workflow #83
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Naman-B-Parlecha <namanparlecha@gmail.com>
WalkthroughTwo new GitHub configuration files are introduced: Changes
Sequence Diagram(s)sequenceDiagram
participant GitHubUser as GitHub User
participant GitHub as GitHub
participant PRLabeler as PR Labeler Workflow
GitHubUser->>GitHub: Open/Synchronize/Reopen Pull Request
GitHub->>PRLabeler: Trigger PR Labeler Workflow
PRLabeler->>GitHub: Assign size label (XS, S, M, L, XL, XXL)
PRLabeler->>GitHub: Assign file-based labels (docs, frontend, backend)
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. 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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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: 4
🧹 Nitpick comments (4)
.github/labeler.yml (1)
19-19
: Add newline at end of fileA newline is required at the end of
.github/labeler.yml
to satisfy POSIX compatibility and avoid YAML parsing warnings.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 19-19: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/pr_labeler.yml (3)
20-20
: Remove trailing whitespaceThere is trailing whitespace on the blank line after
configuration-path: .github/labeler.yml
, which may trigger lint errors.Apply this diff:
- configuration-path: .github/labeler.yml + configuration-path: .github/labeler.yml🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 20-20: trailing spaces
(trailing-spaces)
40-40
: Add newline at end of fileA newline at the end of the workflow file is recommended for POSIX compliance and to avoid YAML warnings.
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 40-40: no new line character at the end of file
(new-line-at-end-of-file)
1-6
: Consider reordering jobs for clarityDefining the
size-label
job before its dependentfile-labeler
job improves readability of the workflow.Example:
jobs: - file-labeler: + size-label: permissions: contents: read pull-requests: write runs-on: ubuntu-latest steps: … - size-label: + file-labeler: needs: size-label runs-on: ubuntu-latest steps: …
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/labeler.yml
(1 hunks).github/workflows/pr_labeler.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/labeler.yml
[warning] 16-16: wrong indentation: expected 0 but found 2
(indentation)
[error] 19-19: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/pr_labeler.yml
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 40-40: no new line character at the end of file
(new-line-at-end-of-file)
This PR adds a GitHub Actions workflow to automatically label pull requests for better maintainability:
size-label-action
: Uses PR diff stats to assign size labels.labeler
: Scans file paths against regex rules inlabeler.yml
.Setup for Maintainer :
Create Labels in Issues Tab:
The workflows will automatically run whenever a pr is opened, changed, reopened
POC
Summary by CodeRabbit