Closed chnuessli closed 3 years ago
This sound like a problem which occurs when the overpass API doesn't return a result. git-auto-commit
is pretty dumb and just commits everything that has changed. It doesn't look into the files or checks if a file has been deleted and would then abort or throw an Exception.
Maybe you can try and check on this line, if the response has any results? If no, then throw an Exception. https://github.com/chnuessli/defi_archive/blob/main/overpass_query.py#L23
(Btw, what a fantastic project you have there with defikarte.ch! And the idea of archiving the data through GitHub 💯)
Okay thank you. I will try to put in a check if the file is empty. thanks for the roses, feel free to contribute by yourself. any help or improvements are very welcome. merry christmas!
Version of the Action
v4.0.0
Describe the bug Sometimes when i run the action, the diff says the whole json file is deleted. I want to find out if the problem is in auto-commit or the overpass api that delivers no result. In my opinion, if there's no answer in the result from overpass, the actions fails. The other way, maybe there's a problem in the diff and therefore, the action thinks it's an empty json file. I dont know if this is a bug, but maybe you can help me out with this.
To Reproduce Steps to reproduce the behavior: Check this two commits: https://github.com/chnuessli/defi_archive/commit/46f0f42ec9dbeb99adb22adaddf037ceecccd523 https://github.com/chnuessli/defi_archive/commit/be890a48dfb766099dff0191840339bc58f71dfb
See the diff in here:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Used Workflow
Additional context If there's not a problem with your code, feel free to close the issue