todo-to-issue-action
todo-to-issue-action copied to clipboard
Action can't retrieve diff when commit is amended
Hmm… Looks like the action isn’t building the correct URL, so it’s returning a bad response. I’ll try and test/fix this tomorrow. Thanks for the heads up.
I've just tried to run the action on an initial commit and it seemed to work fine for me. Please could you share with me your workflow file, or the section earlier in the log (blanking out any sensitive info)?
yeah my bad, was on my phone when i raised it. here's one from a different repo that's public https://github.com/DetachHead/typescript-nodejs-project/runs/3113490991?check_suite_focus=true
I just had a look at your public repos and saw that. I think the problem here is that you are using a very old version where there was no support for initial commits. Please try alstr/[email protected]
and hopefully you should be fine.
hmm, i can't seem to reproduce it anymore but i think it may have something to do with me amending the initial commit. i just made the repo where it happened public so you can take a look if you want https://github.com/DetachHead/ublock-discord/runs/3579846605?check_suite_focus=true
Ah. Looking at the logs, it's saying the before SHA is 33d603fa237dd605a7c5b7b02a833b648a02c184
, but it looks like that commit no longer exists as you've amended it. I think that is where the problem lies as you said.
The action will be querying this URL and getting a bad response:
https://api.github.com/repos/DetachHead/ublock-discord/compare/33d603fa237dd605a7c5b7b02a833b648a02c184...a8276d1ea1c3ef59938b59d689a923158ed709e6
In that case it should probably be querying:
https://api.github.com/repos/DetachHead/ublock-discord/commits/a8276d1ea1c3ef59938b59d689a923158ed709e6
I will have a think about how best to handle this, as I imagine this problem could occur with any amended commit, not just the first. It will add some complexity to the structure me and @lgvalle implemented recently.
Hi @alstr – is there any plan for a fix for this?
Hey, it's still on the list to look at but I don't have an ETA I'm afraid. One workaround that might help is you can now run the action manually, so after amending the commit you could run it again with the updated commit refs.