Skip to content

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

Closed

Description

@ibratoev

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.

Activity

  1. alfieyfc commented on Apr 8, 2021

    @alfieyfc

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

  2. mcieplucha commented on Apr 12, 2021

    @mcieplucha

    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?

  3. 6thpath commented on Sep 17, 2021

    @6thpath

    been 5 months already, any update on this?

  4. kachkaev commented on Nov 24, 2021

    @kachkaev
    Contributor

    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

    😔

  5. boliveira commented on Nov 25, 2021

    @boliveira

    How is the status of this?

  6. beefchimi commented on Jan 6, 2022

    @beefchimi

    Would also love to see a fix for this 🙏

  7. logicbomb421 commented on Jan 29, 2022

    @logicbomb421

    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?

  8. kachkaev commented on Feb 4, 2022

    @kachkaev
    Contributor

    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! 🤞

  9. kachkaev commented on Nov 30, 2022

    @kachkaev
    Contributor

    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.

  10. added
    feature request
    on Dec 12, 2022
  11. MaksimZhukov commented on Jun 6, 2023

    @MaksimZhukov
    Contributor

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

  12. kachkaev commented on Dec 5, 2023

    @kachkaev
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions