Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action does not match folders starting with dot (.) #135

Closed
ibratoev opened this issue Apr 6, 2021 · 11 comments · Fixed by #316
Closed

Action does not match folders starting with dot (.) #135

ibratoev opened this issue Apr 6, 2021 · 11 comments · Fixed by #316
Labels
feature request New feature or request to improve the current logic

Comments

@ibratoev
Copy link

ibratoev commented Apr 6, 2021

Actual:

  • if I have a change in a folder src/.deploy and matcher for src/**/* 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 isaacs/minimatch#30 . Consider passing {dot: true} by default.

@alfieyfc
Copy link

alfieyfc commented Apr 8, 2021

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})); 

const matchers = globs.map(g => new Minimatch(g));

const matchers = globs.map(g => new Minimatch(g));

@mcieplucha
Copy link

mcieplucha commented Apr 12, 2021

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?

@6thpath
Copy link

6thpath commented Sep 17, 2021

been 5 months already, any update on this?

@kachkaev
Copy link
Contributor

kachkaev commented Nov 24, 2021

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

😔

@boliveira
Copy link

How is the status of this?

@beefchimi
Copy link

Would also love to see a fix for this 🙏

@logicbomb421
Copy link

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?

@kachkaev
Copy link
Contributor

kachkaev commented Feb 4, 2022

Today we were configuring labels in blockprotocol/blockprotocol and I was like ‘oh no not this dot problem again’ 😅

So here is the fix: #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! 🤞

@kachkaev
Copy link
Contributor

kachkaev commented Nov 30, 2022

The solution to this confusing issue has been up for nearly 10 months: #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.

@MaksimZhukov
Copy link
Contributor

Hello everyone!
We have released a new version of the action with this feature on board.
Thank you for the patience!

@kachkaev
Copy link
Contributor

kachkaev commented Dec 5, 2023

futurama-good-news-everyone

The dot option is true by default in v5 🎉
Release notes: https://github.com/actions/labeler/releases/tag/v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants