Skip to content

Fetch stack templates without GitHub API in stack new #5648

@matsubara0507

Description

@matsubara0507

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions