commenter

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Approve        = "APPROVE"
	RequestChanges = "REQUEST_CHANGES"
)
View Source
const (
	CommenterName = "github-actions[bot]"
)

Variables

View Source
var (
	ApproveBody        = "Approve:tada:"
	RequestChangesBody = "Request changes:rotating_light:"
)

Functions

This section is empty.

Types

type AbuseRateLimitError

type AbuseRateLimitError struct {
	BackoffInSeconds int
	// contains filtered or unexported fields
}

AbuseRateLimitError return when the GitHub abuse rate limit is hit

func (AbuseRateLimitError) Error

func (e AbuseRateLimitError) Error() string

type CommentAlreadyWrittenError

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

CommentAlreadyWrittenError returned when the error can't be written as it already exists

func (CommentAlreadyWrittenError) Error

type CommentNotValidError

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

CommentNotValidError returned when the comment is for a file or line not in the pr

func (CommentNotValidError) Error

func (e CommentNotValidError) Error() string

type Commenter

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

Commenter is the main commenter struct

func NewCommenter

func NewCommenter(token, owner, repo string, prNumber int) (*Commenter, error)

NewCommenter creates a Commenter for updating PR with comments

func (*Commenter) CreateDraftPRReviewComments added in v0.0.16

func (c *Commenter) CreateDraftPRReviewComments(comments []PRReviewComment) []*github.DraftReviewComment

func (*Commenter) WritePRReview added in v0.0.16

func (c *Commenter) WritePRReview(comments []*github.DraftReviewComment, event string) error

type CommitFileInfo added in v0.0.16

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

type PRDoesNotExistError added in v0.0.16

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

PRDoesNotExistError returned when the PR can't be found, either as 401 or not existing

func (PRDoesNotExistError) Error added in v0.0.16

func (e PRDoesNotExistError) Error() string

type PRReviewComment added in v0.0.16

type PRReviewComment struct {
	FileName  string
	StartLine int
	EndLine   int
	Body      string
}

Jump to

Keyboard shortcuts

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