client

package
v0.0.0-...-6f3f36d Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAssignOperation

type AddAssignOperation struct {
	Owner     string
	Repo      string
	Number    int
	Assignees []string
}

type AddIssueCommentOperation

type AddIssueCommentOperation struct {
	Owner   string
	Repo    string
	Number  int
	Content string
}

type AddLabelOperation

type AddLabelOperation struct {
	Owner  string
	Repo   string
	Number int
	Labels []string
}

type CheckEvent

type CheckEvent struct {
	Action     string
	IsCheckRun bool
	Run        *CheckRun

	IsCheckSuite bool
	Suite        *CheckSuite
}

type CheckRun

type CheckRun struct {
	ID         int64
	HeadSHA    string
	Status     string
	Conclusion string

	Suite *CheckSuite
}

type CheckSuite

type CheckSuite struct {
	ID         int64
	HeadSHA    string
	Status     string
	Conclusion string
}

type ClientInterface

type ClientInterface interface {
	DoOperation(ctx context.Context, op interface{}) error
	CheckMergeable(ctx context.Context, owner, repo string, number int) (bool, error)
	ListPullRequestBySHA(ctx context.Context, owner, repo, sha string) ([]PullRequest, error)
	ListFilesByPullRequest(ctx context.Context, owner, repo string, number int) ([]string, error)
	ListLabels(ctx context.Context, owner, repo string, number int) ([]string, error)
}

func NewGithubClient

func NewGithubClient(client *github.Client) ClientInterface

type CloseOperation

type CloseOperation struct {
	Owner  string
	Repo   string
	Number int
	Object *Object // can get issue or pr info from payload
}

type GetActionInterface

type GetActionInterface interface {
	GetAction() string
}

type GetCommentInterface

type GetCommentInterface interface {
	GetComment() *github.IssueComment
}

type GetInstallationInterface

type GetInstallationInterface interface {
	GetInstallation() *github.Installation
}

type GetIssueInterface

type GetIssueInterface interface {
	GetIssue() *github.Issue
}

type GetNumberInterface

type GetNumberInterface interface {
	GetNumber() int
}

type GetPullRequestInterface

type GetPullRequestInterface interface {
	GetPullRequest() *github.PullRequest
}

type GetRepoInterface

type GetRepoInterface interface {
	GetRepo() *github.Repository
}

type GetReviewInterface

type GetReviewInterface interface {
	GetReview() *github.PullRequestReview
}

type GetSenderInterface

type GetSenderInterface interface {
	GetSender() *github.User
}

type MergeOperation

type MergeOperation struct {
	Owner  string
	Repo   string
	Number int
}

type Object

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

func NewObject

func NewObject(payload interface{}) *Object

func (*Object) Action

func (obj *Object) Action() (action string, ok bool)

func (*Object) Author

func (obj *Object) Author() (author string, ok bool)

func (*Object) Body

func (obj *Object) Body() (body string, ok bool)

func (*Object) CheckEvent

func (obj *Object) CheckEvent() (event *CheckEvent, ok bool)

func (*Object) CommentAuthor

func (obj *Object) CommentAuthor() (author string, ok bool)

func (*Object) GetAction

func (obj *Object) GetAction() (action string, err error)

func (*Object) GetAuthor

func (obj *Object) GetAuthor() (author string, err error)

func (*Object) GetBody

func (obj *Object) GetBody() (body string, err error)

func (*Object) GetCheckEvent

func (obj *Object) GetCheckEvent() (event *CheckEvent, err error)

func (*Object) GetCommentAuthor

func (obj *Object) GetCommentAuthor() (author string, err error)

func (*Object) GetIssueHTMLURL

func (obj *Object) GetIssueHTMLURL() (url string, err error)

func (*Object) GetLables

func (obj *Object) GetLables() (labels []string, err error)

func (*Object) GetNumber

func (obj *Object) GetNumber() (number int, err error)

func (*Object) GetReviewState

func (obj *Object) GetReviewState() (state string, err error)

func (*Object) GetSenderUser

func (obj *Object) GetSenderUser() (user string, err error)

func (*Object) IssueHTMLURL

func (obj *Object) IssueHTMLURL() (url string, ok bool)

func (*Object) Labels

func (obj *Object) Labels() (labels []string, ok bool)

func (*Object) Number

func (obj *Object) Number() (number int, ok bool)

func (*Object) Payload

func (obj *Object) Payload() interface{}

func (*Object) ReviewState

func (obj *Object) ReviewState() (state string, ok bool)

func (*Object) SenderUser

func (obj *Object) SenderUser() (user string, ok bool)

type PullRequest

type PullRequest struct {
	Number  int
	State   string
	Title   string
	Body    string
	Labels  []string
	User    string
	HTMLURL string
}

type RemoveAssignOperation

type RemoveAssignOperation struct {
	Owner     string
	Repo      string
	Number    int
	Assignees []string
}

type RemoveLabelOperation

type RemoveLabelOperation struct {
	Owner  string
	Repo   string
	Number int
	Label  string
}

type ReopenOperation

type ReopenOperation struct {
	Owner  string
	Repo   string
	Number int
	Object *Object // can get issue or pr info from payload
}

type ReplaceLabelOperation

type ReplaceLabelOperation struct {
	Owner              string
	Repo               string
	Number             int
	ReplaceLabelPrefix string
	Labels             []string
}

Operations

type RequestReviewsCancelOperation

type RequestReviewsCancelOperation struct {
	Owner           string
	Repo            string
	Number          int
	CancelReviewers []string
}

type RequestReviewsOperation

type RequestReviewsOperation struct {
	Owner     string
	Repo      string
	Number    int
	Reviewers []string
}

operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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