repometa

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package repometa fetches GitHub repository metadata for use as wheel generation defaults (summary, license, topics, URLs).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// Description is the one-line summary from GitHub ("About" field).
	Description string
	// LicenseSPDX is the SPDX identifier detected by GitHub, or "" when
	// GitHub returns NOASSERTION, "other", or cannot detect a license.
	LicenseSPDX string
	// Homepage is the optional website URL set in repository settings.
	Homepage string
	// HTMLURL is the canonical GitHub URL (https://github.com/owner/repo).
	HTMLURL string
	// Topics are the repository topic tags.
	Topics []string
	// DefaultBranch is the default branch name (usually "main" or "master").
	DefaultBranch string
	// OwnerLogin is the repository owner's GitHub login.
	OwnerLogin string
}

Repo holds the subset of GitHub repository metadata relevant to wheel generation.

func Fetch

func Fetch(ctx context.Context, repo, token string) (*Repo, error)

Fetch retrieves metadata for repo (format: "owner/name") from the GitHub REST API. token is optional; omitting it uses unauthenticated requests (rate limit: 60 requests per hour per IP).

Fetch returns a best-effort result: it never returns a nil *Repo on success — callers should check whether individual fields are empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL