-
-
Notifications
You must be signed in to change notification settings - Fork 313
Add GitHub action to label PRs based on number of files changed #4284
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
Co-authored-by: DonnieBLT <[email protected]>
Co-authored-by: DonnieBLT <[email protected]>
Co-authored-by: DonnieBLT <[email protected]>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community 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 (
|
…P-BLT#4284) * Initial plan for issue * Add GitHub Action to label PRs by number of files changed Co-authored-by: DonnieBLT <[email protected]> * Enhance PR files changed label action with auto-creation and colors Co-authored-by: DonnieBLT <[email protected]> * Add improved error handling and logging to files changed label workflow Co-authored-by: DonnieBLT <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DonnieBLT <[email protected]>
This PR adds a new GitHub Action workflow that automatically labels pull requests based on the number of files changed. This provides a quick visual indicator of the PR's scope.
Features
Adds a "files-changed" label to PRs categorized by file count:
files-changed: 1(green) - 1 file changedfiles-changed: 2-5(yellow) - 2-5 files changedfiles-changed: 6-10(orange) - 6-10 files changedfiles-changed: 11+(red) - 11+ files changedThe action runs when PRs are:
Labels are automatically created with appropriate colors if they don't exist in the repository
Handles updating labels - removes any existing "files-changed" labels before adding the new one to ensure consistency
Includes comprehensive error handling and detailed logging for troubleshooting
Implementation Details
The action uses the GitHub API to:
This helps reviewers quickly understand the scope of changes in a PR without having to check the file list.
Fixes #4283.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.fwupd.org/usr/bin/fwupdmgr refresh(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.