github

package
v0.0.0-...-3d20527 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataBuilder dataBuilder
View Source
var DefaultEventHandler = &defaultEventHandler{log.Get("GitHub.DataBuilder.DefaultHandler")}

Functions

func ReadPayload

func ReadPayload(secret []byte, r *http.Request, v interface{}) ([]byte, error)

Types

type Client

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

func NewAppClient

func NewAppClient(config client.ClientConfig, owner, repo string, installation int) *Client

func NewClient

func NewClient(config client.ClientConfig, owner, repo string) *Client

func (*Client) AddAssignees

func (c *Client) AddAssignees(issue int, assignees ...string) []string

func (*Client) AddComment

func (c *Client) AddComment(issue int, comment string) types.Comment

func (*Client) AddLabel

func (c *Client) AddLabel(issue int, label string) []string

func (*Client) GetAssignees

func (c *Client) GetAssignees(issue int) []string

func (*Client) GetAvailableLabels

func (c *Client) GetAvailableLabels() []string

func (*Client) GetCollaborators

func (c *Client) GetCollaborators() []string

func (*Client) GetComments

func (c *Client) GetComments(issue int) []types.Comment

func (*Client) GetFileContent

func (c *Client) GetFileContent(path string) string

func (*Client) GetFileContentFromRef

func (c *Client) GetFileContentFromRef(path, owner, repo, ref string) string

func (*Client) GetFileNames

func (c *Client) GetFileNames(issue int) []string

func (*Client) GetLabels

func (c *Client) GetLabels(issue int) []string

func (*Client) GetPatch

func (c *Client) GetPatch(issue int) map[string]*string

func (*Client) GetReviewers

func (c *Client) GetReviewers(issue int) map[string]string

func (*Client) GetState

func (c *Client) GetState(issue int) string

func (*Client) Lock

func (c *Client) Lock(issue int)

func (*Client) Locked

func (c *Client) Locked(issue int) bool

func (*Client) Merge

func (c *Client) Merge(issue int, mergeMethod string)

func (*Client) RemoveAssignees

func (c *Client) RemoveAssignees(issue int, assignees ...string) []string

func (*Client) RemoveLabel

func (c *Client) RemoveLabel(issue int, label string) []string

func (*Client) SetStatus

func (c *Client) SetStatus(sha string, description string, state string)

func (*Client) Unlock

func (c *Client) Unlock(issue int)

type EventHandler

type EventHandler interface {
	FromRequest(client.ClientConfig, *http.Request) (types.HookData, bool, error)
	FromPayload(client.ClientConfig, []byte) (types.Data, bool, error)
}

type PullRequestPayload

type PullRequestPayload struct {
	Action       string             `json:"action"`
	Number       int                `json:"number"`
	PullRequest  pullRequestSection `json:"pull_request"`
	Repository   repositorySection  `json:"repository"`
	Installation struct {
		ID int `json:"id"`
	} `json:"installation"`
}

Jump to

Keyboard shortcuts

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