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] An option to include old names of renamed files in deleted_files array #578

Closed
2 tasks done
anshulsahni opened this issue Aug 15, 2022 · 2 comments
Closed
2 tasks done
Labels
enhancement New feature or request

Comments

@anshulsahni
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'm working on a GitHub action workflow where I need a list of all the deleted files, right now the deleted_files output includes only the files which are completely removed and excludes the ones which are renamed. In many cases such as mine1, old names of the renamed files are considered deleted and utilised as such.

Right now, as a workaround I'm using include_all_old_new_renamed_files flag I'm using all_old_new_renamed_files to get the old names of the renamed files and later both the lists are combined in the execution script, but that process is not that straight forward.

Firstly, I don't know why JSON option doesn't work on all_old_new_renamed_files array and everything is passed as one single string, then all different rename cases needs to be separated using the symbol passed as old_new_files_separator parameter, after that old & new named needs to be separated using symbol passed as old_new_separator parameter

Describe the solution you'd like?

I would suggest the solution with the following design

  1. An boolean input parameter like include_old_renamed_in_deleted
  2. When the above parameter is passed with the value true, the deleted files and old names of the renamed files are given as a combined output variable
  3. The renamed files can be combined in the deleted_files array parameter only or the output can be combined in a separate array

Describe alternatives you've considered?

Right now the script utilising the deleted files list, I'm using the same script to combine two arrays of deleted files & renamed files into a single list. But the process is cumbersome as highlighted above

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Footnotes

  1. Building documentation with docs as code, need to update search service (Algolia), about the pages which are removed from the content

@anshulsahni anshulsahni added the enhancement New feature or request label Aug 15, 2022
@github-actions
Copy link
Contributor

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

@jackton1
Copy link
Member

jackton1 commented Aug 19, 2022

@anshulsahni Given the nature of this feature as described it sounds like you're on the right path. It would introduce complexity with little benefit. However, I can always circle back to implement it but the use case can be better handled in a separate action.

run: |
   DELETED_AND_OLD_RENAMED_FILES=(${{...}} ${{...}})

You can also take a look at the docs for other examples and the recently added JSON formatted output feature.

@jackton1 jackton1 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2022
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
Development

No branches or pull requests

2 participants