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

Fetch stack templates without GitHub API in stack new #5648

Closed
matsubara0507 opened this issue Dec 9, 2021 · 1 comment
Closed

Fetch stack templates without GitHub API in stack new #5648

matsubara0507 opened this issue Dec 9, 2021 · 1 comment

Comments

@matsubara0507
Copy link

stack new use GitHub API to fetch template from GitHub (for main default branch) #5447

But, unauthenticated GitHub API has rate limit allows for up to 60 requests per hour.
ref: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting

If possible, I want to stack new is not depend to GitHub API.
GitHub RAW URL can fetch default branch resource using HEAD branch:
https://raw.githubusercontent.com/commercialhaskell/stack/HEAD/README.md
https://raw.githubusercontent.com/matsubara0507/github-graphql-example.hs/HEAD/README.md <- default is main

FYI: GitLab and Bitbucket too
https://gitlab.haskell.org/ghc/ghc/raw/HEAD/README.md
https://bitbucket.org/khibino/haskell-relational-record/raw/HEAD/README.md

So, How about stack new use HEAD branch instead of GitHub API ?

However, I’m concerned document is not exist about HEAD branch.

@mpilgrem
Copy link
Member

Closing, as related to #6034 and that has been resolved by:

  • Stack will use the value of the GH_TOKEN, or GITHUB_TOKEN, environment
    variable as credentials to authenticate its GitHub REST API requests.

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

No branches or pull requests

2 participants