gh

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GHlistInstallations     = listInstallations
	GHlistAppsInstalledRepo = listAppsInstalledRepo
)

function pointers (for testing)

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, githubPersonalToken string) error

ExistGitHubRepository check exist of github repository

func GenerateGitHubAppsToken added in v1.7.0

func GenerateGitHubAppsToken(gheDomain string, installationID int64) (string, *time.Time, error)

GenerateGitHubAppsToken generate token of GitHub Apps using private key

func IsInstalledGitHubApp added in v1.7.0

func IsInstalledGitHubApp(ctx context.Context, gheDomain, inputScope string) (int64, error)

IsInstalledGitHubApp check installed GitHub Apps in gheDomain + inputScope

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