gruntwork-io / fetch

Download files, folders, and release assets from a specific git commit, branch, or tag of public and private GitHub repos.
https://www.gruntwork.io/
MIT License
587 stars 90 forks source link

fixes issues 26 & 46. Added support for pagination #83

Closed m-bal closed 3 years ago

m-bal commented 3 years ago

FetchTags only returns the first 30 tags so

fetch --repo https://github.com/gruntwork-io/terratest --tag="<0.2.0" ./LocalDir

fails with ... Tag does not exist because terratest has 200+ tags and 0.2.0 isn't in the first 30 tags.

I increased the per_page result to 100 and added a loop to get the next link from the link header.

I believe this fixes both issue #26 and #46.

brikis98 commented 3 years ago

Alright, I may have to wrap this PR up myself... I'm going to create a new PR with your commits, and fix the final few issues on top of that.

brikis98 commented 3 years ago

OK, I've opened https://github.com/gruntwork-io/fetch/pull/85 to wrap this up. Thanks!