Documentation ¶
Index ¶
- func CreateOrganizationRegistrationToken(ctx context.Context, client *Client, owner string) (*github.RegistrationToken, *github.Response, error)
- func ListOrganizationRunners(ctx context.Context, client *Client, owner string, opts *github.ListOptions) (*github.Runners, *github.Response, error)
- func RemoveOrganizationRunner(ctx context.Context, client *Client, owner string, runnerID int64) (*github.Response, error)
- type Client
- func (c *Client) GetRegistrationToken(ctx context.Context, org, repo, name string) (*github.RegistrationToken, error)
- func (c *Client) ListRunners(ctx context.Context, org, repo string) ([]*github.Runner, error)
- func (c *Client) RemoveRunner(ctx context.Context, org, repo string, runnerID int64) error
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 ¶
Client wraps GitHub client with some additional
func NewClientWithAccessToken ¶
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 ¶
ListRunners returns a list of runners of specified owner/repository name.