Expand description
Shared GitHub tags-API client, used by every ecosystem that resolves package versions
from GitHub repository tags rather than a dedicated package registry (deps-swift,
deps-github-actions).
Each ecosystem crate layers its own extras on top of GithubTagsClient —
deps-swift adds GitHub Releases publish-date enrichment, deps-github-actions adds a
rate-limit cooldown gate, in-flight request coalescing, and a tag<->SHA cross-reference.
Only the pieces that were byte-for-byte identical between the two — constants,
owner/repo validation, auth-header setup, the tags-pagination loop, and page parsing —
live here, so the two crates cannot silently diverge on this shared behavior (#472).
Re-exports§
pub use crate::pagination::page_has_more;
Structs§
- Github
Tag - GitHub tags API response item.
- Github
TagCommit - The
commitobject nested in aGithubTag. - Github
Tags Client - Shared cache, auth-header, and API-base state for a GitHub-tags-backed registry client.
- Release
Dates Cache - Memoized, best-effort GitHub Releases publish-date cache.
Constants§
- GITHUB_
API - Base URL for the GitHub REST API.
- MAX_
TAG_ PAGES - Maximum number of
tagspages fetched per repository (100 tags/page).
Functions§
- github_
rate_ limit_ error - The actionable error returned when a request hits GitHub’s unauthenticated rate limit (60 req/h per IP, vs 5000 req/h with a token).
- is_
valid_ github_ identity - Whether
namematches theowner/repoGitHub identifier shape every GitHub-tags-backed ecosystem accepts. - normalize_
tag - Strips a leading
v/Vtag prefix. - paginate_
tags - Drives the GitHub tags pagination loop: page 1 alone, then subsequent pages in batches
of up to
CONCURRENCYpages. - parse_
tags_ page - Parses a single GitHub tags API response page into raw tag entries.
- validate_
owner_ repo - Validates that
nameis a validowner/repoGitHub identifier before it reaches a{api_base}/repos/{name}/...fetch as a bare path segment. - warn_
if_ pagination_ truncated - Logs a warning when tag pagination for
namestops atMAX_TAG_PAGESwhile GitHub still had more pages available (page_has_more(page_len)).