-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Labeler | ||
on: [pull_request_target] | ||
|
||
jobs: | ||
label: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/labeler@v4 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# .github/labeler.yml | ||
|
||
# Label PRs that modify documentation files | ||
Documentation: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
- changed-files: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
- '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 commentThe 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. |
||
- head-branch: ['^feature'] | ||
|
||
# Label PRs that modify files in the agent directory | ||
Agent: | ||
- changed-files: | ||
- 'agent/**' | ||
|
||
# Label PRs that modify files in the .github directory | ||
GitHub: | ||
- changed-files: | ||
- '.github/**' | ||
|
||
# Label PRs that modify files in the .turbo directory | ||
Turbo: | ||
- changed-files: | ||
- '.turbo/**' | ||
|
||
# Label PRs that modify files in the characters directory | ||
Characters: | ||
- changed-files: | ||
- 'characters/**' | ||
|
||
# Label PRs that modify files in the client directory | ||
Client: | ||
- changed-files: | ||
- 'client/**' | ||
- changed-files: | ||
- 'packages/client-*/**' | ||
|
||
# Label PRs that modify files in the packages directory | ||
Packages: | ||
- changed-files: | ||
- 'packages/**' | ||
|
||
# Label PRs that modify files in the scripts directory | ||
Scripts: | ||
- changed-files: | ||
- 'scripts/**' | ||
|
||
# Label PRs that modify files in the src directory | ||
Source: | ||
- changed-files: | ||
- 'src/**' | ||
|
||
# Label PRs that modify files in the tests directory | ||
Tests: | ||
- changed-files: | ||
- 'tests/**' | ||
|
||
# Label PRs that modify files in the packages/adapter* directories | ||
Adapter: | ||
- changed-files: | ||
- 'packages/adapter*/**' | ||
|
||
# Label PRs that modify files in the packages/core directory | ||
Core: | ||
- changed-files: | ||
- 'packages/core/**' | ||
|
||
# Label PRs that modify files in the packages/plugin* directories | ||
Plugin: | ||
- changed-files: | ||
- 'packages/plugin*/**' |
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'.