gh

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPullRequestChangedLines

func GetPullRequestChangedLines(
	ctx context.Context,
	client *github.Client,
	owner, repo string,
	number int,
) (int, error)

GetPullRequestSize returns the total number of changed lines of the specified pull request.

func SetLabelOnPullRequest

func SetLabelOnPullRequest(
	ctx context.Context,
	client *github.Client,
	owner, repo string,
	number int,
	size Size,
) error

SetLabelOnPullRequest checks the current labels on the pull request. If there exists a label for pull request size, the function replaces it with the proper label. Otherwise, the function just attach the proper label.

Types

type Size

type Size int
const (
	SizeXS Size = iota
	SizeS
	SizeM
	SizeL
	SizeXL
	SizeXXL
)

func NewSize

func NewSize(change int) Size

func (Size) GetLabel

func (s Size) GetLabel() string

func (Size) String

func (s Size) String() string

Jump to

Keyboard shortcuts

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