github

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package github is the v0 implementation of tracker.Tracker backed by GitHub Issues. Each GitHub repo becomes a tracker.Project, keyed by "owner/repo". Pull requests are filtered out of the issues list (the GitHub Issues API returns both, distinguished by a non-nil pull_request field).

Auth is bearer-token (PAT or fine-grained PAT). GitHub Enterprise Server is not supported in v0 — see internal/githost/github.

Index

Constants

View Source
const (
	Provider       = "github"
	DefaultBaseURL = "https://api.github.com"
)

Variables

This section is empty.

Functions

func New

func New(baseURL, token string) (tracker.Tracker, error)

New returns a Client. baseURL is typically https://api.github.com.

Types

type Client

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

Client implements tracker.Tracker against GitHub Issues.

func (*Client) ListIssues

func (c *Client) ListIssues(ctx context.Context, projectKey string, since time.Time) iter.Seq2[tracker.Issue, error]

ListIssues streams issues for projectKey ("owner/repo") updated after since (zero means everything). GitHub's /issues endpoint returns both issues and pull requests; the pull_request field discriminates the two and PR rows are dropped.

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context) ([]tracker.Project, error)

ListProjects returns every repo the authed user can see whose Issues feature is enabled. Archived / disabled repos are skipped. ProjectKey is the repo's "owner/repo" full name.

func (*Client) Name

func (c *Client) Name() string

Jump to

Keyboard shortcuts

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