labeler
labeler copied to clipboard
Action does not match folders starting with dot (.)
Actual:
- if I have a change in a folder
src/.deploy
and matcher forsrc/**/*
it would not be matched.
Expected:
- folders starting with dot should be matched as well.
It seems the issue is related to how Minimatch works. See https://github.com/isaacs/minimatch/issues/30 . Consider passing {dot: true}
by default.
I'm just giving it a wild guess, would it be just to add that parameter to these two lines?
const matchers = globs.map(g => new Minimatch(g, {dot: true}));
https://github.com/actions/labeler/blob/69990a6043bd2b78ec675ec775d8e1cb62204ff0/src/main.ts#L187 https://github.com/actions/labeler/blob/69990a6043bd2b78ec675ec775d8e1cb62204ff0/src/main.ts#L202
actually I'm having issues even with root level configuration like:
- ./*.js
which seems to be not working. anyone did manage to make it work?
been 5 months already, any update on this?
How about adding a new action param to make the fix non-breaking?
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ dot: true
Happy to work on the PR if anyone reading this comment has capacity to review it and cut a release. Alternatively, we can just add { dot: true }
to minimatch and release version 4.
Our current .github/labeler.yml
in hashintel/hash is pretty long because of this issue:
packages/foo:
- packages/foo/*
- packages/foo/.*
- packages/foo/**/*
- packages/foo/**/.*
# β repeat Γ20
π
How is the status of this?
Would also love to see a fix for this π
My company uses this action and is also encountering this issue. Seems like this is a pretty simple update, would it be possible to get this out soon?
Today we were configuring labels in blockprotocol/blockprotocol and I was like βoh no not this dot problem againβ π
So here is the fix: https://github.com/actions/labeler/pull/316. It is non-breaking, just allows us to set the dot
input:
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
+ dot: true
repo-token: "${{ secrets.GITHUB_TOKEN }}"
I hope it will become available for everyone soon! π€
The solution to this confusing issue has been up for nearly 10 months: https://github.com/actions/labeler/pull/316 π Any chance we can get it merged before NY2023? π€
In the meantime I am using my own fork in one repo:
steps:
- uses: kachkaev/labeler@305cfeb74cfa5c4878bf6418b4815a4106f2e345
## @todo replace with actions/labeler@v4 (or newer) when this PR is merged:
## https://github.com/actions/labeler/pull/316
with:
dot: true
repo-token: "${{ secrets.GITHUB_TOKEN }}"
This works but does not let me stay up to date with other potential updates in actions/labeler
. I'd love to switch back to the original action when dot
option is released.
Hello everyone! We have released a new version of the action with this feature on board. Thank you for the patience!
The dot
option is true
by default in v5 π
Release notes: https://github.com/actions/labeler/releases/tag/v5.0.0