gh

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGithubServerURL = "https://github.com"

Variables

This section is empty.

Functions

func PushUsingLocalGit added in v0.9.0

func PushUsingLocalGit(ctx context.Context, gitRoot string, addPaths []string, message string) error

func SplitRepository added in v0.13.0

func SplitRepository(r string) (string, string, error)

Types

type Gh

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

func New

func New() (*Gh, error)

func (*Gh) DetectCurrentJobID

func (g *Gh) DetectCurrentJobID(ctx context.Context, owner, repo string) (int64, error)

func (*Gh) DetectCurrentPullRequestNumber added in v0.11.0

func (g *Gh) DetectCurrentPullRequestNumber(ctx context.Context, owner, repo string) (int, error)

func (*Gh) GetDefaultBranch added in v0.14.0

func (g *Gh) GetDefaultBranch(ctx context.Context, owner, repo string) (string, error)

func (*Gh) GetRawRootURL

func (g *Gh) GetRawRootURL(ctx context.Context, owner, repo string) (string, error)

func (*Gh) GetStepExecutionTimeByTime

func (g *Gh) GetStepExecutionTimeByTime(ctx context.Context, owner, repo string, jobID int64, t time.Time) (time.Duration, error)

func (*Gh) GetStepsByName added in v0.10.0

func (g *Gh) GetStepsByName(ctx context.Context, owner, repo string, name string) ([]Step, error)

func (*Gh) PushContent

func (g *Gh) PushContent(ctx context.Context, owner, repo, branch, content, cp, message string) error

func (*Gh) PutComment added in v0.11.0

func (g *Gh) PutComment(ctx context.Context, owner, repo string, n int, comment string) error

type GitHubEvent added in v0.13.0

type GitHubEvent struct {
	Name    string
	Number  int
	State   string
	Payload interface{}
}

func DecodeGitHubEvent added in v0.13.0

func DecodeGitHubEvent() (*GitHubEvent, error)

type Step added in v0.10.0

type Step struct {
	Name        string
	StartedAt   time.Time
	CompletedAt time.Time
}

Jump to

Keyboard shortcuts

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