github

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppClient

func GetAppClient(appID int64, installation int64, privateKeyFilename string) *github.Client

func GetClient

func GetClient(token string) *github.Client

Types

type CreateReviewersPayload

type CreateReviewersPayload struct {
	Owner       string
	Name        string
	IssueNumber int
	Reviewers   []string
}

type EditIssueCommentPayload

type EditIssueCommentPayload struct {
	Owner     string
	Name      string
	CommentID int64
	Comment   string
}

type Github

type Github interface {
	// けす
	Verify(r *http.Request, secret []byte) ([]byte, error)
	// けす
	ParseWebHook(r *http.Request, payload []byte) (interface{}, error)
	CreateReviewers(payload *CreateReviewersPayload) (*github.PullRequest, *github.Response, error)
	EditIssueComment(payload *EditIssueCommentPayload) (*github.IssueComment, *github.Response, error)
}

func NewClient

func NewClient(ghClient *github.Client) Github

type RequestValidator

type RequestValidator interface {
	Validate(r *http.Request, secret []byte) ([]byte, error)
}

func NewGithubValidator

func NewGithubValidator() RequestValidator

Jump to

Keyboard shortcuts

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