github

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PullRequest

type PullRequest = github.PullRequest

PullRequest is a type alias of github.PullRequest

type Repository

type Repository interface {
	GetFullName() string
	GetSSHURL() string
	GetCloneURL() string
}

Repository is a interface to get information of git repository.

type RepositoryName

type RepositoryName struct {
	FullName string
}

RepositoryName is a github repository name.

func (*RepositoryName) Owner

func (r *RepositoryName) Owner() (string, error)

Owner get a repository owner.

func (*RepositoryName) Repo

func (r *RepositoryName) Repo() (string, error)

Repo get a repository name without owner.

type Service

type Service interface {
	GetPullRequest(ctx context.Context, repository Repository, num int) (*PullRequest, error)
	CreateCommitStatus(ctx context.Context, src *TargetSource, state State, description string) error
}

Service describes a github service.

func New added in v0.3.0

func New() (Service, error)

New returns a github service.

type State

type State = string

State represents state of commit status

const (
	// PENDING represents pending state.
	PENDING State = "pending"
	// SUCCESS represents success state.
	SUCCESS State = "success"
	// ERROR represents error state.
	ERROR State = "error"
	// FAILURE represents failure state.
	FAILURE State = "failure"
)

type Status

type Status = github.RepoStatus

Status is a type alias of github.RepoStatus

type TargetSource added in v0.4.0

type TargetSource struct {
	Repo Repository
	Ref  string
	SHA  plumbing.Hash
}

TargetSource stores Repo, Ref and SHA for target

func (*TargetSource) GetRef added in v0.5.0

func (s *TargetSource) GetRef() string

GetRef returns a ref

func (*TargetSource) GetSHA added in v0.5.0

func (s *TargetSource) GetSHA() plumbing.Hash

GetSHA returns a hash

func (*TargetSource) GetURL added in v0.5.0

func (s *TargetSource) GetURL() string

GetURL returns a clone URL

Directories

Path Synopsis
Package mock_github is a generated GoMock package.
Package mock_github is a generated GoMock package.

Jump to

Keyboard shortcuts

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