Documentation
¶
Index ¶
- func PersonalAccessToken(ctx context.Context, token string) *http.Client
- func RestRequest(method string, format string, args ...interface{}) (*http.Request, error)
- type ActionsService
- func (s *ActionsService) CreateRunnersRegistrationToken(ctx context.Context, owner, repo string) (*ActionsToken, *github.Response, error)
- func (s *ActionsService) CreateRunnersRemoveToken(ctx context.Context, owner, repo string) (*ActionsToken, *github.Response, error)
- func (s *ActionsService) CreateRunnersTokenRequest(ctx context.Context, owner, repo, tokenType string) (*ActionsToken, *github.Response, error)
- func (s *ActionsService) DeleteRunners(ctx context.Context, owner, repo string, runnerID int64) (*github.Response, error)
- func (s *ActionsService) ListRunners(ctx context.Context, owner, repo string) ([]*Runner, *github.Response, error)
- func (s *ActionsService) ListRunnersDownloads(ctx context.Context, owner, repo string) ([]*RunnerDownload, *github.Response, error)
- type ActionsToken
- type Client
- type Runner
- type RunnerDownload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PersonalAccessToken ¶
PersonalAccessToken creates a new Oauth2 http client utilizing the personal access token
Types ¶
type ActionsService ¶
type ActionsService struct {
*github.ActionsService
// contains filtered or unexported fields
}
ActionsService exposes the github actions apis in the Client
func (*ActionsService) CreateRunnersRegistrationToken ¶
func (s *ActionsService) CreateRunnersRegistrationToken(ctx context.Context, owner, repo string) (*ActionsToken, *github.Response, error)
CreateRunnersRegistrationToken Returns a token that you can pass to the config script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the administration permission to use this endpoint.
func (*ActionsService) CreateRunnersRemoveToken ¶
func (s *ActionsService) CreateRunnersRemoveToken(ctx context.Context, owner, repo string) (*ActionsToken, *github.Response, error)
CreateRunnersRemoveToken Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the administration permission to use this endpoint.
func (*ActionsService) CreateRunnersTokenRequest ¶
func (s *ActionsService) CreateRunnersTokenRequest(ctx context.Context, owner, repo, tokenType string) (*ActionsToken, *github.Response, error)
CreateRunnersTokenRequest Returns a create/remove token which can be used for the config script or remove script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the administration permission to use this endpoint.
func (*ActionsService) DeleteRunners ¶
func (s *ActionsService) DeleteRunners(ctx context.Context, owner, repo string, runnerID int64) (*github.Response, error)
DeleteRunners Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the administration permission to use this endpoint.
func (*ActionsService) ListRunners ¶
func (s *ActionsService) ListRunners(ctx context.Context, owner, repo string) ([]*Runner, *github.Response, error)
ListRunners Lists all self-hosted runners for a repository. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the administration permission to use this endpoint.
func (*ActionsService) ListRunnersDownloads ¶
func (s *ActionsService) ListRunnersDownloads(ctx context.Context, owner, repo string) ([]*RunnerDownload, *github.Response, error)
ListRunnersDownloads Lists binaries for the self-hosted runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the administration permission to use this endpoint.
type ActionsToken ¶
type ActionsToken struct {
Token *string `json:"token,omitempty"`
ExpiresAt *github.Timestamp `json:"expires_at,omitempty"`
}
ActionsToken represents a create/remove token for a Github actions runner
type Client ¶
type Client struct {
*github.Client
Actions *ActionsService
}
Client decorates the github.Client with newly added github actions API calls.