Skip to content

Commit

Permalink
fix: correct labeler GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
awpala committed Aug 19, 2024
1 parent ad40323 commit d46007c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 18 deletions.
44 changes: 26 additions & 18 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
# Add 'root' label to any root file changes
# Quotation marks are required for the leading asterisk
root:
- changed-files:
- any-glob-to-any-file: '*'

name: Labeler
on: [pull_request_target]
# Add 'AnyChange' label to any changes within the entire repository
AnyChange:
- changed-files:
- any-glob-to-any-file: '**'

jobs:
label:
# Add 'Documentation' label to any change to .md files within the entire repository
Documentation:
- changed-files:
- any-glob-to-any-file: '**/*.md'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
source:
- all:
- changed-files:
- any-glob-to-any-file: 'src/**/*'
- all-globs-to-all-files: '!src/docs/*'

steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
feature:
- head-branch: ['^feature', 'feature']

# Add 'release' label to any PR that is opened against the `main` branch
release:
- base-branch: 'main'
22 changes: 22 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

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 }}"

0 comments on commit d46007c

Please sign in to comment.