Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 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
	ListMilestones(ctx context.Context, orgRepo string) ([]*Milestone, error)
	UpdateMilestone(ctx context.Context, orgRepo string, number int, milestone *Milestone) error
	DeleteMilestone(ctx context.Context, orgRepo string, number int) error
	CreateMilestone(ctx context.Context, repo string, milestone *Milestone) 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

type Milestone added in v0.1.0

type Milestone github.Milestone

Jump to

Keyboard shortcuts

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