github

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

internal/workitem/github/provider.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, logger *slog.Logger, cfg *config.Config) (workitem.Provider, error)

New creates a new Provider by discovering the repository from the local git remote.

func NewWithClient

func NewWithClient(client *gh.Client, logger *slog.Logger, owner, repo string) workitem.Provider

NewWithClient creates a new Provider with an existing GitHub client.

Types

type Provider

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

Provider implements the workitem.Provider interface for GitHub Issues.

func (*Provider) CreateItem

func (p *Provider) CreateItem(ctx context.Context, item workitem.WorkItem) (*workitem.WorkItem, error)

func (*Provider) CreateLabel

func (p *Provider) CreateLabel(ctx context.Context, label workitem.Label) (*workitem.Label, error)

func (*Provider) GetItem

func (p *Provider) GetItem(ctx context.Context, number int, withComments bool) (*workitem.WorkItem, error)

func (*Provider) ListItems

func (p *Provider) ListItems(ctx context.Context, options workitem.ListOptions) ([]workitem.WorkItem, error)

func (*Provider) SearchItems

func (p *Provider) SearchItems(ctx context.Context, query string) ([]workitem.WorkItem, error)

func (*Provider) UpdateItem

func (p *Provider) UpdateItem(ctx context.Context, number int, item workitem.WorkItem) (*workitem.WorkItem, error)

Jump to

Keyboard shortcuts

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