github

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 8 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 lists the repositories User discovery selects from, with credentials in the actions-runner-controller's githubConfigSecret format, so discovery and the scale sets share one Secret.

Index

Constants

View Source
const (
	KeyToken             = "github_token"
	KeyAppID             = "github_app_id"
	KeyAppInstallationID = "github_app_installation_id"
	KeyAppPrivateKey     = "github_app_private_key"
)

The keys of an actions-runner-controller githubConfigSecret.

View Source
const DefaultAPIURL = "https://api.github.com"

DefaultAPIURL is GitHub.com's REST API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client lists repositories as one GitHub App installation or token.

func FromSecret

func FromSecret(apiURL string, data map[string][]byte) (*Client, error)

FromSecret returns a Client for the GitHub REST API at apiURL with the credentials in data, the contents of a githubConfigSecret: a token, or a GitHub App's ID, installation ID and private key.

func (*Client) Repositories

func (c *Client) Repositories(ctx context.Context) ([]*github.Repository, error)

Repositories lists every repository the credentials can see: those granted to the App installation, or those the token's owner owns.

Directories

Path Synopsis
Package githubtest is an in-memory stand-in for the parts of GitHub's API that package github calls.
Package githubtest is an in-memory stand-in for the parts of GitHub's API that package github calls.

Jump to

Keyboard shortcuts

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