github

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckService added in v1.1.0

type CheckService service

CheckService handles communication with the checkrun/checksuite event.

type IssueService added in v1.1.0

type IssueService service

IssueService handles communication with the issue event. Issue Comment also refer to a pull request comment.

type PullRequestService added in v1.1.0

type PullRequestService service

PullRequestService handles communication with the pull request event.

type Worker

type Worker struct {
	Config config.Settings
	Client v41.Client
}

Worker represents the general configuration to run a provider.

func New

func New(auth *config.Settings) *Worker

New initialize a Worker.

func (*Worker) CreateCheckRun

func (w *Worker) CreateCheckRun(owner string, repo string, checkrun v41.CreateCheckRunOptions) (*v41.CheckRun, error)

CreateCheckRun create a check run.

func (*Worker) CreatePulllRequestOverviewComment added in v1.1.0

func (w *Worker) CreatePulllRequestOverviewComment(owner *string, repo string, pullRequestNumber int)

CreatePulllRequestOverviewComment create a pull request comment with the report (overview diff).

func (*Worker) DeleteRef

func (w *Worker) DeleteRef(owner string, repo string, ref string) (*v41.Response, error)

DeleteRef delete a reference.

func (*Worker) GetCheckRun

func (w *Worker) GetCheckRun(owner string, repo string, checkrunID int64) (*v41.CheckRun, error)

GetCheckRun get a check run.

func (*Worker) GetPullRequest

func (w *Worker) GetPullRequest(owner string, repo string, number int) (*v41.PullRequest, error)

GetPullRequest get a pull request.

func (*Worker) GetPullRequestFiles added in v1.1.0

func (w *Worker) GetPullRequestFiles(owner string, repo string, number int, opts *v41.ListOptions) ([]*v41.CommitFile, error)

GetPullRequestFiles list files from a pull request.

func (*Worker) GetPulllRequestOverviewComment added in v1.1.0

func (w *Worker) GetPulllRequestOverviewComment(owner *string, repo string, pullrequestID int) *v41.IssueComment

GetPulllRequestOverviewComment get a pull request comment with the report (overview diff).

func (*Worker) GetRef

func (w *Worker) GetRef(owner string, repo string, ref string) (*v41.Reference, error)

GetRef get a reference.

func (*Worker) Handler

func (w *Worker) Handler(response http.ResponseWriter, request *http.Request)

Handler webhook event handler.

func (*Worker) IssueCreateComment added in v1.1.0

func (w *Worker) IssueCreateComment(owner string, repo string, number int, comment v41.IssueComment) (*v41.IssueComment, error)

IssueCreateComment create an issue or pull request comment.

func (*Worker) IssueListComments added in v1.1.0

func (w *Worker) IssueListComments(owner string, repo string, number int, opts *v41.IssueListCommentsOptions) ([]*v41.IssueComment, error)

IssueListComments list the comments of an issue or pull request.

func (*Worker) IssueUpdateComment added in v1.1.0

func (w *Worker) IssueUpdateComment(owner string, repo string, commentID int, comment v41.IssueComment) (*v41.IssueComment, error)

IssueUpdateComment update an issue or pull request comment.

func (*Worker) MergePullRequest

func (w *Worker) MergePullRequest(owner string, repo string, number int, commitMessage string, options v41.PullRequestOptions) (*v41.PullRequestMergeResult, error)

MergePullRequest merge a pull request.

func (*Worker) PullRequestCreateReview

func (w *Worker) PullRequestCreateReview(owner string, repo string, number int, review v41.PullRequestReviewRequest) (*v41.PullRequestReview, error)

PullRequestCreateReview create a pull request review.

func (*Worker) UpdateCheckRun

func (w *Worker) UpdateCheckRun(owner string, repo string, checkrunID int64, checkRun v41.UpdateCheckRunOptions) (*v41.CheckRun, error)

UpdateCheckRun update a check run.

Jump to

Keyboard shortcuts

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