Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pagination where required #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NixM0nk3y
Copy link

Githubs API now only returns 100 items from its API ( even when asking for 1000)

The number of terragrunt release now greatly exceeds the 100 (245/ 3 pages) which means older 0.17 era versions are no longer found by tgenv.

This commit intros pagination to allow all versions to be found

}

# single page result-s (no pagination), have no Link: section, the grep result is empty
last_page=`curl -I --tlsv1.2 -s "https://api.github.com/repos/gruntwork-io/terragrunt/tags?per_page=100" -H "${GITHUB_API_HEADER_ACCEPT}" | grep '^link:' | sed -e 's/^link:.*page=//g' -e 's/>.*$//g'`
Copy link

@tydomitrovich tydomitrovich Jan 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up, I was testing this fix and found that the pagination did not work unless link was capitalized.

this is no longer the case, lowercase is working again

@michaelpporter
Copy link

This would fix #16

@tsunamishaun
Copy link

@michaelpporter any chance for a new release?

@michaelpporter
Copy link

@tsunamishaun I have no control over this repo.

@ghost
Copy link

ghost commented Sep 17, 2021

Tested this on my tgenv as I was hitting the same issue when trying to install an old version (0.18.7). This fix works perfectly, excellent work by @NixM0nk3y - @cunymatthieu please can we get this merged into master?

@fabiogermann
Copy link

@cunymatthieu can we get this merged? would be important to be able to install older versions

@ChrisLanks
Copy link

Yes. This would have also helped us today to have this merged in

@iokiwi
Copy link

iokiwi commented Jul 31, 2023

@fabiogermann @ChrisLanks this project has been abandoned for years. A few of us forked the project and fixed this issue in tgenv/tgenv#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants