-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: add auto-labeler based off of code changes #1320
base: develop
Are you sure you want to change the base?
Conversation
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.
This PR introduces a much-needed automation feature to streamline our workflow by automatically labeling pull requests. The approach using GitHub Actions is well-structured and should significantly enhance our efficiency in managing PRs. However, thorough testing is crucial to ensure that the labeling criteria align perfectly with our existing and future needs. Great job on the detailed testing steps provided, which will help in validating the changes effectively.
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/labeler@v4 |
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.
Ensure that the permissions are set correctly to avoid any security issues, especially with 'pull-requests: write'.
|
||
# Label PRs that modify documentation files | ||
Documentation: | ||
- changed-files: |
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.
Consider adding comments to clarify the purpose and usage of each label configuration for future maintainability.
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.
This pull request introduces an innovative automated labeling system that will significantly enhance our workflow efficiency. The implementation appears solid, but I recommend thorough testing with various pull requests to ensure labels are applied correctly. Great work on this!
# .github/labeler.yml | ||
|
||
# Label PRs that modify documentation files | ||
Documentation: |
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.
Defined clear labeling rules for different directories, which will help maintain organization in our pull requests.
- 'docs/**' | ||
|
||
# Label PRs with 'feature' if the head branch name starts with 'feature' | ||
Feature: |
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.
Ensure that the regex for head-branch accurately matches your desired feature branches. Consider expanding this to include other branch naming conventions if necessary.
Relates to:
This PR addresses the need to automate the labeling of pull requests based on file paths and branch names, enhancing workflow efficiency and organization. #1325
Risks
Background
What does this PR do?
This PR introduces a GitHub Actions workflow that automatically labels pull requests based on the paths of modified files and branch names. It utilizes the
actions/labeler
action to apply predefined labels, streamlining the triage process.What kind of change is this?
Documentation changes needed?
Testing
Where should a reviewer start?
Review the
.github/labeler.yml
file for label configurations and the.github/workflows/labeler.yml
file for the workflow setup.Detailed testing steps
Review Configuration Files:
.github/labeler.yml
contains accurate label definitions corresponding to file paths and branch naming conventions..github/workflows/labeler.yml
is correctly configured to trigger on pull request events.Create Test Pull Requests:
Monitor Workflow Execution:
Validate Label Application:
.github/labeler.yml
.Adjust Configurations if Necessary:
Deployment instructions
No special deployment instructions are required. Once merged, the workflow will be active and apply labels to new pull requests based on the defined criteria.
By implementing this automated labeling system, we aim to improve the efficiency of our pull request management process, ensuring that contributions are accurately categorized and reviewed promptly.