github

package
v0.4.1-rc5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package github provides the GitHub implementation of the workitem provider.

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)

CreateItem creates a new work item in the backend system.

func (*Provider) CreateLabel

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

CreateLabel creates a new label in the backend system.

func (*Provider) GetItem

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

GetItem retrieves a single work item by its public number, optionally fetching comments.

func (*Provider) ListItems

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

ListItems retrieves a collection of work items based on the provided options.

func (*Provider) SearchItems

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

SearchItems uses a provider-specific query string to find work items.

func (*Provider) UpdateItem

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

UpdateItem updates an existing work item in the backend system.

Jump to

Keyboard shortcuts

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