github

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package github is the ingestion.ForgeClient adapter for GitHub, backed by google/go-github.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIdentifier = errors.New("identifier must be in owner/name form")

ErrInvalidIdentifier is returned when a repo identifier isn't "owner/name".

View Source
var ErrUnexpectedStatus = errors.New("unexpected status")

ErrUnexpectedStatus is returned when a GitHub API response's status code is neither the expected success code nor 304 Not Modified.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the GitHub-backed ingestion.ForgeClient.

func NewClient

func NewClient(baseURL string) (*Client, error)

NewClient returns a Client. baseURL overrides the GitHub API endpoint (for tests against a fake server); pass "" to use the real GitHub API.

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(ctx context.Context, req ingestion.CreateWebhookRequest) error

CreateWebhook implements ingestion.ForgeClient.

func (*Client) ListAccessibleRepos added in v0.11.0

func (c *Client) ListAccessibleRepos(ctx context.Context, req ingestion.ListAccessibleReposRequest) ([]string, error)

ListAccessibleRepos implements ingestion.ForgeClient. Returns every repo (owner, collaborator, and organization-member repos) the token can see, newest-pushed first, excluding archived, forked, and mirror repos -- none of the three is something the registration UI's picker should ever offer to track.

func (*Client) ListRecentRuns added in v0.4.0

ListRecentRuns implements ingestion.ForgeClient. The run-list request is conditional (If-None-Match/ETag); a 304 short-circuits before any jobs are fetched, since nothing about the run list changed. go-github's typed client isn't used here -- CheckResponse treats a 304 as an API error, so a plain net/http request keeps the conditional-GET contract explicit and testable against a fake server.

func (*Client) RateLimitFor added in v0.25.0

func (c *Client) RateLimitFor(token string) (ingestion.RateLimitSnapshot, bool)

RateLimitFor implements ingestion.RateLimitReporter.

Jump to

Keyboard shortcuts

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