Expand description
builtins_github submodule.
GitHub REST API primitives — pragmatic wrappers around api.github.com.
Designed for parallel-map workflows:
my @repos = gh_repos("MenkeTechnologies")
my @stars = pmap { gh_repo($_->{full_name})->{stargazers_count} } @reposAll builtins authenticate via the GITHUB_TOKEN environment variable
when present (5000 req/hour); otherwise fall back to unauthenticated
access (60 req/hour). List endpoints auto-paginate up to a safety cap
(GH_MAX_PAGES, default 10 = up to 1000 items at per_page=100).
Builtins: gh_get(PATH, [opts]) — generic GET, parsed JSON gh_user(USER) — /users/USER gh_org(ORG) — /orgs/ORG gh_repo(OWNER, REPO) — /repos/OWNER/REPO gh_repos(USER) — /users/USER/repos (paginated) gh_org_repos(ORG) — /orgs/ORG/repos (paginated) gh_starred(USER) — /users/USER/starred (paginated) gh_followers(USER) — /users/USER/followers (paginated) gh_following(USER) — /users/USER/following (paginated) gh_gists(USER) — /users/USER/gists (paginated) gh_gist(ID) — /gists/ID gh_issues(OWNER, REPO) — /repos/OWNER/REPO/issues (paginated) gh_prs(OWNER, REPO) — /repos/OWNER/REPO/pulls (paginated) gh_commits(OWNER, REPO) — /repos/OWNER/REPO/commits (paginated) gh_branches(OWNER, REPO) — /repos/OWNER/REPO/branches (paginated) gh_tags(OWNER, REPO) — /repos/OWNER/REPO/tags (paginated) gh_releases(OWNER, REPO) — /repos/OWNER/REPO/releases (paginated) gh_contributors(OWNER, REPO) — /repos/OWNER/REPO/contributors (paginated) gh_forks(OWNER, REPO) — /repos/OWNER/REPO/forks (paginated) gh_stargazers(OWNER, REPO) — /repos/OWNER/REPO/stargazers (paginated) gh_topics(OWNER, REPO) — array of topic names gh_languages(OWNER, REPO) — { language => bytes } hashref gh_readme(OWNER, REPO) — decoded README content (string) gh_workflows(OWNER, REPO) — workflows array gh_runs(OWNER, REPO) — workflow runs array gh_search_repos(QUERY) — /search/repositories (paginated) gh_search_users(QUERY) — /search/users (paginated) gh_search_code(QUERY) — /search/code (paginated) gh_search_issues(QUERY) — /search/issues (paginated) gh_rate_limit() — /rate_limit gh_meta() — /meta gh_zen() — /zen (plain-text string) gh_emojis() — /emojis (hashref)
Errors: network / 4xx / 5xx → runtime error. 404 returns undef so callers
can pmap { gh_repo(...) } over a list including dead names without
aborting the whole pipeline.
Functions§
- gh_
branches gh_branches— see implementation.- gh_
commits gh_commits— see implementation.- gh_
contributors gh_contributors— see implementation.- gh_
emojis gh_emojis— see implementation.- gh_
followers gh_followers— see implementation.- gh_
following gh_following— see implementation.- gh_
forks gh_forks— see implementation.- gh_get
gh_get(PATH)— GET an arbitrary GitHub REST endpoint.PATHcan be a relative path (/users/MenkeTechnologies) or a full URL. Returns parsed JSON as a stryke value; 404 →undef.- gh_gist
gh_gist— see implementation.- gh_
gists gh_gists— see implementation.- gh_
issues gh_issues— see implementation.- gh_
languages gh_languages(OWNER, REPO)—{ language => bytes }hashref.- gh_meta
gh_meta— see implementation.- gh_org
gh_org— see implementation.- gh_
org_ repos gh_org_repos— see implementation.- gh_prs
gh_prs— see implementation.- gh_
rate_ limit gh_rate_limit— see implementation.- gh_
readme gh_readme(OWNER, REPO)— base64-decoded README content as a UTF-8 string.- gh_
releases gh_releases— see implementation.- gh_repo
gh_repo— see implementation.- gh_
repos gh_repos— see implementation.- gh_runs
gh_runs— see implementation.- gh_
search_ code gh_search_code— see implementation.- gh_
search_ issues gh_search_issues— see implementation.- gh_
search_ repos gh_search_repos— see implementation.- gh_
search_ users gh_search_users— see implementation.- gh_
stargazers gh_stargazers— see implementation.- gh_
starred gh_starred— see implementation.- gh_tags
gh_tags— see implementation.- gh_
topics gh_topics(OWNER, REPO)— returns an arrayref of topic name strings.- gh_user
gh_user— see implementation.- gh_
workflows gh_workflows— see implementation.- gh_zen
gh_zen()— GitHub’s “zen” endpoint. Returns a plain-text string, not JSON.