-
Notifications
You must be signed in to change notification settings - Fork 48
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
Renamed files do not show as modified, added or removed, but do appear in files
#108
Comments
files
Ah, I see what happened - these blank test files show as being renamed, that is why they don't show up as This does show a bit of an inconsistency though, because it means:
but there is no individual option to test for files_renamed. |
I'm also interested to track renamed/moved files, reading this issue it seems that feature is not yet covered? |
We've also run into an issue with not picking up renamed files. GitHub doesn't include the "old" file (one that was renamed) in the list of modified files. The old name is only included as an additional field on the renamed files entry, which the action code doesn't do anything with. Seeing that this issue has been around for a while, we are fixing it ourselves. Ticket is on our backlog at the moment, but I will be issuing a PR once we've established it works. |
Who is "we" and what backlog is this? Is this involving this action or something else?
If it were just that then it wouldn't be too bad. I mean if at least the new name was listed in added files then it would be OK-ish for most users. BTW: |
Apologies, I realise my comment was a bit cryptic. I meant 'we' as in the company I'm working for at the moment, and the backlog being the one we have internally (which is pretty long!) You're right that the issue isn't something that causes problems for the most part. It is only affecting my current team as we are using terraform in quite a specific way that depends on the file-changes-action to determine which .tf files have changed to then decide which files to run Thanks for the tip about |
I dug into the code a bit and while it is not documented like the rest of them, there is a files_renamed object that has the info I needed in it:
I dont actually know js or typescript (im a python/R dev) but I think it is getting added here: file-changes-action/src/FilesHelper.ts Lines 24 to 30 in a6ca26c
Annnnnyways if you are having issues with this try accessing the renames directly with that path. |
Describe the bug
files_added
andfiles_removed
are not showing in my test setup, onlyfiles_modified
is working correctly.And
files
which should show all, just shows modified and new.Workflow
Here are the relevant parts of my workflow (other actions not shown include checkout):
Expected behavior
I'm removing three files (
four
,five
andsix
), adding three files (one
,two
andthree
), modifying one file (run_checks.sh
), each in their own commit, then pushing these commits to a branch with a Pull Request.I would expect this:
Actual output:
Not quite sure what is going on here!
Particularly strange that the added files are not showing in
files_added
but they are infiles
.The text was updated successfully, but these errors were encountered: