github

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 Github

type Github struct {
	Token    string
	Owner    string
	Repo     string
	PrNumber int
	// contains filtered or unexported fields
}

func NewGithub

func NewGithub(token, owner, repo string, prNumber int) (gh *Github, err error)

func NewGithubServer

func NewGithubServer(apiUrl, token, owner, repo string, prNumber int) (gh *Github, err error)

func (*Github) RemovePreviousKhulnasoftComments

func (c *Github) RemovePreviousKhulnasoftComments(_ string) error

func (*Github) WriteLineComment

func (c *Github) WriteLineComment(file, comment string, line int) error

WriteLineComment writes a single review line on a file of the github PR

func (*Github) WriteMultiLineComment

func (c *Github) WriteMultiLineComment(file, comment string, startLine, endLine int) error

WriteMultiLineComment writes a multiline review on a file in the github PR

type PrDoesNotExistError

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

func (e PrDoesNotExistError) Error() string

Jump to

Keyboard shortcuts

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