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
[BUG] files_ignore
used with files
not ignoring as expected
#901
Comments
Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience. |
@koshy1123 I believe this can be configured by setting the |
Thanks! I'll give it a shot and report back. |
@jackton1 This isn't quite what I expected, now I get an empty set instead. My expectation was that I'll see what else I can do. EDIT: I realize I should've moved this sentence
to the "Expected Behavior" section |
@koshy1123 In that case I’ll reopen this and double check why it doesn’t work as expected. |
Actually @koshy1123 I believe the bug is with your implementation Notice you used - name: Get changed folders
id: changed-folders
uses: tj-actions/changed-files@v35
with:
json: "true"
dir_names: "true"
dir_names_max_depth: 2
files_ignore: |
**/docs/**
**.md
files: |
products/**
- name: Get changed folders
id: changed-folders
uses: tj-actions/changed-files@v35
with:
json: "true"
dir_names: "true"
dir_names_max_depth: 2
files_ignore: |
**/docs/**
**.md
products/**.md
files: |
products/** Let me know if that resolved the issue. For more information on this see: #795 (comment) |
Thanks for the pointer - I didn't realize there were different rules compared to Github's file filter documentation. The EDIT: This repo is now deleted.
All that said, I was able to use the file filter rules to work for my use case, I just changed
to
which works well enough for me since I don't expect to capture changes from the top level folder for my action. Happy to leave this closed, but I leave it to your discretion. Thanks again for your help! |
@koshy1123 This should now be resolved |
Is there an existing issue for this?
Does this issue exist in the latest version?
Describe the bug?
Maybe I'm misunderstanding the capabilities of these two levers, but I used
files_ignore
andfiles
in conjunction, but the outputs of this action is undesirable for my use case. By usingfiles_ignore
, I want to exclude files listed in that section from being considered as "changes", but that's not what's happening.The closest I could find was this issue: #675 but it looks like that was user error - hoping that's the same here.
To Reproduce
products/README.md
and some nested file underproducts/gri
, I expected the output to be a list with one elementproducts/gri
, but what I get is a list of two elements:products/gri
ANDproducts
.What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
I thought by specifying
files_ignore: **.md
, it wouldn't captureproducts
as a changed directory, since the only change in that directory is theREADME.md
file.I expected the output to be a list with one element
products/gri
, but what I get is a list of two elements:products/gri
ANDproducts
.Relevant log output
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: