github

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*github.Client

	// GithubBaseURL to Github without API suffix.
	GithubBaseURL string
	// contains filtered or unexported fields
}

Client wraps GitHub client with some additional

func (*Client) GetRegistrationToken

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

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

func (*Client) IsRunnerBusy added in v0.18.0

func (r *Client) IsRunnerBusy(ctx context.Context, enterprise, org, repo, name string) (bool, error)

func (*Client) ListRepositoryWorkflowRuns added in v0.18.0

func (c *Client) ListRepositoryWorkflowRuns(ctx context.Context, user string, repoName string) ([]*github.WorkflowRun, error)

func (*Client) ListRunners

func (c *Client) ListRunners(ctx context.Context, enterprise, 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, enterprise, org, repo string, runnerID int64) error

RemoveRunner removes a runner with specified runner ID from repository.

type Config added in v0.10.0

type Config struct {
	EnterpriseURL     string `split_words:"true"`
	AppID             int64  `split_words:"true"`
	AppInstallationID int64  `split_words:"true"`
	AppPrivateKey     string `split_words:"true"`
	Token             string
}

Config contains configuration for Github client

func (*Config) NewClient added in v0.10.0

func (c *Config) NewClient() (*Client, error)

NewClient creates a Github Client

type RunnerNotFound added in v0.18.0

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

func (*RunnerNotFound) Error added in v0.18.0

func (e *RunnerNotFound) Error() string

type RunnerOffline added in v0.18.0

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

func (*RunnerOffline) Error added in v0.18.0

func (e *RunnerOffline) Error() string

Directories

Path Synopsis
Package metrics provides monitoring of the GitHub related metrics.
Package metrics provides monitoring of the GitHub related metrics.

Jump to

Keyboard shortcuts

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