autofix-ci / action

The autofix.ci GitHub Action.
https://autofix.ci/
MIT License
131 stars 2 forks source link

BUG: `mv a b` leaves `a` in place #10

Closed larsoner closed 11 months ago

larsoner commented 11 months ago

See this PR in my project where I'm trying to implement a git mv on a file based on its name -- first I tried what is basically:

git mv other.rst 12318.other.rst

in my code followed by autofix.ci/action, but other.rst stuck around after the action. Then I tried plain mv and the same thing happened. See this Actions run where the mv is done:

https://github.com/mne-tools/mne-python/actions/runs/7292596505/job/19873926695#step:5:12

followed by the autofix.ci commit that only adds a file , does not delete the old one -- and should really git mv it:

https://github.com/mne-tools/mne-python/pull/12318/commits/c94ee0567b39db0e665e914755e3938830c2c1bc

mhils commented 11 months ago

Thanks for the clear repro! 🍰 This is indeed a bug in the action Javascript. We're tripping on the fact that

git diff --name-only --staged

only returns 12318.other.rst, not other.rst.

mhils commented 11 months ago

This should be fixed now, thanks again!

larsoner commented 11 months ago

:astonished: that must be some sort of record response time... seems to work, thanks for the lightning-fast fix!