github

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 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

type CheckService service

CheckService handles communication with the checkrun/checksuite event.

type IssueService

type IssueService service

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

type PullRequestService

type PullRequestService service

PullRequestService handles communication with the pull request event.

type Worker

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

Worker represents the general configuration to run the github provider.

func New

func New(cfg *model.Settings) *Worker

New initialize a GitHub handler 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

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) Events

func (w *Worker) Events(c *gin.Context)

Events github events handler.

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

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

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) IssueCreateComment

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

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

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