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

[Feature] Availability to check specific files changes #1447

Closed
2 tasks done
clauBv23 opened this issue Aug 10, 2023 · 6 comments · Fixed by #1464
Closed
2 tasks done

[Feature] Availability to check specific files changes #1447

clauBv23 opened this issue Aug 10, 2023 · 6 comments · Fixed by #1464
Labels
enhancement New feature or request

Comments

@clauBv23
Copy link

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

I started using changed-files a few days ago, I'm using the following configuration

          json: true
          quotepath: false
          dir_names: true
          dir_names_exclude_current_dir: true
          dir_names_max_depth: 2

I only want to check the dir that changes, but there are some specific scenarios when I would like to know if there is a file in the current directory that changes (ex. if the .json changes ).

I went over the documentation and didn't find a way to accomplish it.

Describe the solution you'd like?

It would be really helpful if I could also get if some specific files changes.

I was thinking of something like :

          json: true
          quotepath: false
          dir_names: true
          dir_names_exclude_current_dir: true
          dir_names_max_depth: 2
          include_files: [list of needed files paths]

Describe alternatives you've considered?

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@clauBv23 clauBv23 added the enhancement New feature or request label Aug 10, 2023
@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@jackton1
Copy link
Member

jackton1 commented Aug 10, 2023

Hi @clauBv23 can you provide an example of what you expect the outputs to be using a directory structure?

@clauBv23
Copy link
Author

Hi @jackton1, sure.
Currently, I'm only receiving the changed directories but I would also know if there are some files that changed, for example
In the following project structure:

- Root
   - .github
      - workflows
         - wf.yaml  
   - src
      - Pkg1
         - file1
         - file2
      - Pkg2
         - file21
         - file22
   - pkg.json

it will show the changes in files inside pkg1 pkg2 and workflow but not the changes in pkg.json.
The current output will be something like

[".github/workflows", "src/pkg1", "src/pkg2"]

and the expected one

[".github/workflows", "src/pkg1", "src/pkg2", "pkg.json"]

@jackton1
Copy link
Member

Hi, @clauBv23 this should be available in the latest v38 release.

@clauBv23
Copy link
Author

Thanks @jackton1, I'll take a look at it

@jackton1
Copy link
Member

Hi @clauBv23 you can now provide the patterns using dir_names_include_files input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants