Skip to content

Commit

Permalink
add labeler
Browse files Browse the repository at this point in the history
  • Loading branch information
elhmn committed Jun 20, 2024
1 parent 5c5aafa commit 4cb7ddf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'Route: deprecated':
- changed-files:
- any-glob-to-any-file: ['lib/router.js']
- all-globs-to-any-file: ['lib/routes-deprecated/**/*.js', '!lib/routes-deprecated/index.js']

'Route':
- changed-files:
- any-glob-to-any-file: ['lib/routes/**/*.ts']

core enhancement:
- changed-files:
- any-glob-to-any-file: ['lib/routes/index.ts']
- all-globs-to-any-file: ['lib/**', '!lib/config.ts', '!lib/router.js', '!lib/routes/**', '!lib/routes-deprecated/**']

dependencies:
- changed-files:
- any-glob-to-any-file: ['package.json', 'pnpm-lock.yaml', 'yarn.lock']
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Linter

# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
# pull_request includes [opened, reopened, synchronize] events by default
# 'edited' is required for title-lint
on:
push: {}
pull_request:
types: [opened, reopened, synchronize, edited]
pull_request_target:
types: [opened, reopened, synchronize, edited]

jobs:
labeler:
name: Pull Request Labeler
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' }}
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4cb7ddf

Please sign in to comment.