Github API ... Getting the original file name in a moved / renamed file

Im currently working on cms and creating a remote ajax / php script updater. The cms files are located on Github, and im use the API to get the changes to the file and the source of these changes. As you can see here: https://api.github.com/repos/Plexis/Plexis/commits/116743cefde6765a4d4a8d0558bd17c4908dd586

The files section lists all modified files. The problem is renaming / moving files. It seems I don't know how to get the source file, so I can undo it with php. If I try to get all the trees, this may take an ajax request to directoy ... This is too much. Does anyone have an idea where I can get the name and location of the source file before renaming / moving it?

+5
source share
1 answer

You can ask your changes how you are doing now, but for new files it doesn’t exist, or you can try

https://api.github.com/repos/{user}/{repo}/commits?path={file.path}

for my story. You can also try with hast, a hash is the same event if the file has a different name

+1
source

All Articles