Skip to content

Commit

Permalink
👷 Add labeler workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Oct 5, 2024
1 parent 7fddf10 commit d838805
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
docs:
- all:
- changed-files:
- any-glob-to-any-file:
- docs/**

internal:
- all:
- changed-files:
- any-glob-to-any-file:
- .github/**
- scripts/**
- .gitignore
- .pre-commit-config.yaml
- requirements*.txt
- all-globs-to-all-files:
- '!docs/**'
31 changes: 31 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Labels
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
# For label-checker
- labeled
- unlabeled

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
# Run this after labeler applied labels
check-labels:
needs:
- labeler
permissions:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
one_of: breaking,security,feature,bug,refactor,upgrade,docs,internal
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d838805

Please sign in to comment.