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

Glob expressions #28

Open
drstrangelooker opened this issue Jan 28, 2022 · 2 comments
Open

Glob expressions #28

drstrangelooker opened this issue Jan 28, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@drstrangelooker
Copy link

The glob expressions in filters is confusing. In particular I found that a filter like this:

          filters: |
            python:
              - python/**

did not match even though this

on:
  pull_request:
    paths:
      - python/**

would match in a github action.

The solution was to use a pattern like - python/**/*.

I suggest that the file globbing should be done like the paths: expressions in github actions, or that this difference should be clearly noted in the documents.

@drstrangelooker
Copy link
Author

https://github.com/tony84727/changed-file-filter/blob/master/src/glob.ts#L12-L23

Adding a replacer like this:

    {
      from: '**',
      to: '.*'
    },

after the replacer for '**/ might be enough.

@tony84727
Copy link
Owner

Hi, thank you for pointing this out.

I suggest that the file globbing should be done like the paths: expressions in github actions, or that this difference should be clearly noted in the documents.

I agree that the glob should match the Github Action's flavor.

@tony84727 tony84727 added the good first issue Good for newcomers label Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants