github

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrganizationRegistrationToken added in v0.5.0

func CreateOrganizationRegistrationToken(ctx context.Context, client *Client, owner string) (*github.RegistrationToken, *github.Response, error)

CreateOrganizationRegistrationToken creates a token that can be used to add a self-hosted runner on an organization.

GitHub API docs: https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-an-organization

func ListOrganizationRunners added in v0.5.0

func ListOrganizationRunners(ctx context.Context, client *Client, owner string, opts *github.ListOptions) (*github.Runners, *github.Response, error)

ListOrganizationRunners lists all the self-hosted runners for an organization.

GitHub API docs: https://developer.github.com/v3/actions/self-hosted-runners/#list-self-hosted-runners-for-an-organization

func RemoveOrganizationRunner added in v0.5.0

func RemoveOrganizationRunner(ctx context.Context, client *Client, owner string, runnerID int64) (*github.Response, error)

RemoveOrganizationRunner forces the removal of a self-hosted runner in a repository using the runner id.

GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#remove-a-self-hosted-runner

Types

type Client

type Client struct {
	*github.Client
	// contains filtered or unexported fields
}

Client wraps GitHub client with some additional

func NewClient

func NewClient(appID, installationID int64, privateKeyPath string) (*Client, error)

NewClient returns a client authenticated as a GitHub App.

func NewClientWithAccessToken

func NewClientWithAccessToken(token string) (*Client, error)

NewClientWithAccessToken returns a client authenticated with personal access token.

func (*Client) GetRegistrationToken

func (c *Client) GetRegistrationToken(ctx context.Context, org, repo, name string) (*github.RegistrationToken, error)

GetRegistrationToken returns a registration token tied with the name of repository and runner.

func (*Client) ListRunners

func (c *Client) ListRunners(ctx context.Context, org, repo string) ([]*github.Runner, error)

ListRunners returns a list of runners of specified owner/repository name.

func (*Client) RemoveRunner

func (c *Client) RemoveRunner(ctx context.Context, org, repo string, runnerID int64) error

RemoveRunner removes a runner with specified runner ID from repository.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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