github

package
v0.7.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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