I have been using github v3 rest api to download archive from my repo. But I found that when I download immediately after a new commit is pushed, the archive may not contain the newest commit.
Then I learned from the http response of API ‘get archive link’ that the download url is actually [https://codeload.github.com/[user]/[repo]/legacy.zip/branch]. So I tried to download the archive directly with browser and found error occurred sometimes.
Firstly I pushed a commit with id ‘1’ and then download, the archive is [user]-[repo]-1.zip and has the newest commit.
Secondly I pushed a commit with id ‘2’ and then download, the archive is [user]-[repo]-2.zip and has the newest commit.
But then I pushed a commit with id ‘3’ and then download, the downloaded archive is [user]-[repo]-1.zip and does not contain updates in commit ‘2’ and commit ‘3’.
I want to know if this is normal? Does github guarantee the downloaded archive is real-time? If not, do you have any work around to help me solve this problem because I need to ensure the downloaded files contain the newest commit.
Thanks in advance and looking forward to your replies.