gh

package
v0.0.0-...-81c14df Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(appID, installationID int64) *Client

func (*Client) CreateComment

func (client *Client) CreateComment(ctx context.Context, thread *Thread, body string)

func (*Client) HandleEvent

func (client *Client) HandleEvent() func(http.ResponseWriter, *http.Request)

HandleEvent returns handlerFunc for github webhook event requests.

func (*Client) RegisterOnCommented

func (Client *Client) RegisterOnCommented(f OnCommentedFunc)

func (*Client) VerifyURL

func (client *Client) VerifyURL(rawURL string) (owner, repo string, num int, err error)

VerifyURL parses and verifies the URL and returns an error if the URL is incorrect. https://pkg.go.dev/github.com/google/go-github/v45@v45.0.0/github?utm_source=gopls#Issue > Note: As far as the GitHub API is concerned, every pull request is an issue, but not every issue is a pull request. Some endpoints, events, and webhooks may also return pull requests via this struct.

type OnCommentedFunc

type OnCommentedFunc func(client *Client, thread *Thread, comment *github.IssueComment) error

type Thread

type Thread struct {
	Owner string
	Repo  string
	Num   int
}

Thread is info to designate github thread.

Jump to

Keyboard shortcuts

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