github

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFoundError

func IsNotFoundError(err error) bool

Types

type Client

type Client interface {
	ListPullRequests(ctx context.Context, r Repository, revision string) ([]PullRequest, error)
	CreateComment(ctx context.Context, r Repository, pullNumber int, body string) error
	CreateDeploymentStatus(ctx context.Context, d Deployment, ds DeploymentStatus) error
	FindLatestDeploymentStatus(ctx context.Context, d Deployment) (*DeploymentStatus, error)
}

func NewClient

func NewClient(ctx context.Context) (Client, error)

type Comment

type Comment struct {
	Repository Repository
	CommitSHA  string
	Body       string
}

type Deployment

type Deployment struct {
	Repository Repository
	Id         int64
}

func ParseDeploymentURL

func ParseDeploymentURL(s string) *Deployment

ParseDeploymentURL parses the URL. For example, https://api.github.com/repos/int128/sandbox/deployments/422988781

type DeploymentStatus

type DeploymentStatus struct {
	State          string
	Description    string
	LogURL         string
	EnvironmentURL string
}

type PullRequest

type PullRequest struct {
	Number int
	Files  []string
}

type Repository

type Repository struct {
	Owner string
	Name  string
}

func ParseRepositoryURL

func ParseRepositoryURL(s string) *Repository

Jump to

Keyboard shortcuts

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