Skip to content
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

ci: add PR labeler action #18109

Merged
merged 5 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
documentation:
Copy link
Member

Choose a reason for hiding this comment

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

we do already have the same label coming from our github bot. Should we do this from both the places or keep one alive?

Copy link
Contributor Author

@snitin315 snitin315 Feb 14, 2024

Choose a reason for hiding this comment

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

The bot attaches the label as per the PR title, it's fine to keep it at both places. Also, this is yet to be implemented in other eslint repositories.

- any:
- changed-files:
- all-globs-to-all-files: ['docs/**', '!lib/rules/**']

rule:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/rules/**']

cli:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/cli.js', 'lib/options.js', 'lib/cli-engine/**', 'lib/eslint/**']

core:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/{config,eslint,linter,rule-tester,source-code}/**', 'lib/api.js']

formatter:
- any:
- changed-files:
- any-glob-to-any-file: ['lib/cli-engine/formatters/**']

"github actions":
- any:
- changed-files:
- any-glob-to-any-file: ['.github/workflows/**']
12 changes: 12 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on: pull_request_target
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
sync-labels: .github/labeler.yml