Skip to content

Commit

Permalink
ci: add PR labeler action (#18109)
Browse files Browse the repository at this point in the history
* ci: standardize auto labeling

* chore: fix key name

* chore: add ESLint label

* chore: update github actions label

* ci: update labeler config
  • Loading branch information
snitin315 committed Feb 16, 2024
1 parent 73a5f06 commit cace6d0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/labeler.yml
@@ -0,0 +1,29 @@
documentation:
- 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
@@ -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

0 comments on commit cace6d0

Please sign in to comment.