github

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSource = "github.com/elliottpolk/agentic-kernel"

DefaultSource is the canonical kernel used when --kernel.source is omitted.

Variables

This section is empty.

Functions

func CheckRateLimit

func CheckRateLimit(ctx context.Context, client *gogithub.Client) error

CheckRateLimit fetches the current GitHub API core rate limit and returns an error (including the reset time) if the limit is exhausted. It is intended as a pre-flight check before any API calls are made.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true when err is a GitHub API 404 response.

func NewClient

func NewClient(ctx context.Context, token string) *gogithub.Client

NewClient constructs a GitHub API client. If token is non-empty it creates an authenticated client via an oauth2 transport; otherwise it returns an unauthenticated client subject to GitHub's lower rate limits.

func ParseSource

func ParseSource(source string) (owner, repo string, err error)

ParseSource parses a kernel source string of the form "host/owner/repo". An empty or whitespace-only value resolves to DefaultSource. Any host other than "github.com" returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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