gh

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSignature

func CheckSignature(installationID int64) error

CheckSignature check trust installation id from event.

func DivideScope added in v1.6.1

func DivideScope(scope string) (string, string)

DivideScope divide scope to owner and repo

func ExistGitHubRepository

func ExistGitHubRepository(scope, gheDomain string, gheDomainValid bool, githubPersonalToken string) error

ExistGitHubRepository check exist of github repository

func ListRunners added in v1.6.1

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

ListRunners get runners that registered repository or org

func NewClient

func NewClient(ctx context.Context, personalToken, gheDomain string) (*github.Client, error)

NewClient create a client of GitHub

Types

type Scope

type Scope int

Scope is scope for auto-scaling target

const (
	Unknown Scope = iota
	Repository
	Organization
)

Scope values

func DetectScope

func DetectScope(scope string) Scope

DetectScope detect a scope (repo or org)

func (Scope) String

func (s Scope) String() string

String is fmt.Stringer interface

Jump to

Keyboard shortcuts

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