labeler
labeler copied to clipboard
How to add labels regardless of file path
Hello, and thanks for your contribution.
I've been trying to add the labels needs code review
and needs functional test
to a pull request when it is open, regardless of the file match. I tried this content in my .github/labeler.yml
:
needs code review:
- '*'
needs functional test:
- '*'
But it did not work.
Can anybody help me?
Thanks in advance.
I'm having the same issue. Here's the debug log output
##[debug] checking pattern "*" ##[debug] checking "any" patterns ##[debug] matching patterns against file ci/pre-build/unit-tests.yaml ##[debug] - * ##[debug] * did not match ##[debug] matching patterns against file ci/scripts/run-unit-tests.sh ##[debug] - * ##[debug] * did not match ##[debug] "any" patterns did not match any files
# .github/labeler.yml
foo:
- "*"
# .github/workflows/labeler.yml
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Hello @tregismoreira and @JasonMFry !
The '*'
glob will match only root file changes. If you want to add a label when changing a file in sub folder, you should use '**/*'
glob.
I’m closing the issue. Please let us know if you have any concerns.