pull

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	pull.Context

	// DefaultBranch returns the default branch of the repo that the pull
	// request targets.
	DefaultBranch() string

	// DownloadCode downloads the code to a temporary directory and returns its
	// path and a cleanup function.
	DownloadCode() (path string, cleanup func(), err error)

	// LatestDetailedStatuses returns a map of status check names to the latest
	// detailed result
	LatestDetailedStatuses() (map[string]*github.RepoStatus, error)
}

func NewGitHubContext

func NewGitHubContext(ctx context.Context, mbrCtx pull.MembershipContext, globalCache pull.GlobalCache, client *github.Client, v4client *githubv4.Client, httpClient *http.Client, loc Locator) (Context, error)

type GitHubContext

type GitHubContext struct {
	pull.Context
	// contains filtered or unexported fields
}

func (*GitHubContext) DefaultBranch

func (ghc *GitHubContext) DefaultBranch() string

func (*GitHubContext) DownloadCode

func (ghc *GitHubContext) DownloadCode() (string, func(), error)

func (*GitHubContext) LatestDetailedStatuses

func (ghc *GitHubContext) LatestDetailedStatuses() (map[string]*github.RepoStatus, error)

type Locator

type Locator pull.Locator

Locator identifies a pull request and optionally contains a full or partial pull request object.

func (Locator) IsComplete

func (loc Locator) IsComplete() bool

IsComplete returns true if the locator contains a pull request object with all required fields.

Jump to

Keyboard shortcuts

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