github

package
v0.0.0-...-4bd8555 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SuccessStatus = Status{
		Name:        "success",
		Description: "All the jobs were successful.",
	}
	PendingStatus = Status{
		Name:        "pending",
		Description: "Currently building the jobs...",
	}
	FailureStatus = Status{
		Name:        "failure",
		Description: "At least one of the jobs failed.",
	}
	ErrorStatus = Status{
		Name:        "error",
		Description: "An error occured.",
	}
)

Functions

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

Types

type BotClient

type BotClient struct {
	Client *github.Client
}

BotClient refers to the custom GitHub client for this bot

func GetClientFromInstallationID

func GetClientFromInstallationID(id int64) BotClient

GetClientFromInstallationID returns the GitHub Client object from the Installation ID

func (BotClient) WriteStatus

func (botClient BotClient) WriteStatus(owner, repo, rev, jobName string, status Status)

WriteStatus creates a new status via the provided client on a specific commit of a client's repository The description is automatically written and the target URL is hard-coded.

type Status

type Status struct {
	Name        string
	Description string
}

Status is a GitHub API status containing a name and a description

Jump to

Keyboard shortcuts

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