api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const IssuesPerPage = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetIssue(ctx context.Context, orgRepo string, issue int) (*Issue, error)
	GetIssues(ctx context.Context, orgRepo string, options IssueListOptions, page int) ([]*Issue, error)
	UpdateLabels(ctx context.Context, orgRepo string, issue int, labels []string) error
	UpdateIssueState(ctx context.Context, orgRepo string, issue int, state string) error
	Ping(ctx context.Context) error
	Comment(ctx context.Context, repo string, issueNumber int, message string) error
	ListLabels(ctx context.Context, orgRepo string) ([]*Label, error)
	UpdateLabel(ctx context.Context, orgRepo string, originalName string, label *Label) error
	DeleteLabel(ctx context.Context, orgRepo string, name string) error
	CreateLabel(ctx context.Context, repo string, label *Label) error
}

func New

func New(token string) Client

type Issue

type Issue github.Issue

func (*Issue) AddLabel

func (i *Issue) AddLabel(label string) []string

func (*Issue) HasLabel

func (i *Issue) HasLabel(label string) bool

func (*Issue) RemoveLabel

func (i *Issue) RemoveLabel(label string) []string

func (*Issue) ReplaceLabel

func (i *Issue) ReplaceLabel(label string, newLabel string) []string

type IssueListOptions

type IssueListOptions struct {
	Labels string
	State  string
	Since  time.Time
}

type Label

type Label github.Label

Jump to

Keyboard shortcuts

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