collector

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestsPassed

func TestsPassed(checkRuns []model.CheckRun) bool

TestsPassed checks if all check runs passed.

Types

type Collector

type Collector interface {
	// ListRepos returns repositories matching the filter criteria.
	ListRepos(ctx context.Context, orgs []string, filter model.RepoFilter) ([]model.Repo, error)

	// ListDependencyPRs returns open dependency PRs for a repository.
	ListDependencyPRs(ctx context.Context, repo model.RepoRef) ([]model.PullRequest, error)

	// GetPRDetails returns detailed information about a specific PR.
	GetPRDetails(ctx context.Context, repo model.RepoRef, prNumber int) (*model.PullRequest, error)

	// GetPRChecks returns the CI check runs for a PR.
	GetPRChecks(ctx context.Context, repo model.RepoRef, prNumber int) ([]model.CheckRun, error)

	// GetLatestRelease returns the most recent release for a repository.
	GetLatestRelease(ctx context.Context, repo model.RepoRef) (*model.Release, error)

	// ListTags returns all tags for a repository.
	ListTags(ctx context.Context, repo model.RepoRef) ([]model.Tag, error)

	// GetMergedPRsSinceTag returns PRs merged since the given tag.
	GetMergedPRsSinceTag(ctx context.Context, repo model.RepoRef, tagName string) ([]model.PullRequest, error)
}

Collector defines the interface for collecting repository and PR information.

func NewGitHub

func NewGitHub(token string) Collector

NewGitHub creates a new GitHub collector with the given token.

type GitHubCollector

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

GitHubCollector implements Collector for GitHub repositories.

func NewGitHubCollector

func NewGitHubCollector(token string) *GitHubCollector

NewGitHubCollector creates a new GitHub collector.

func (*GitHubCollector) GetLatestRelease

func (c *GitHubCollector) GetLatestRelease(ctx context.Context, repo model.RepoRef) (*model.Release, error)

GetLatestRelease returns the most recent release for a repository.

func (*GitHubCollector) GetMergedPRsSinceTag

func (c *GitHubCollector) GetMergedPRsSinceTag(ctx context.Context, repo model.RepoRef, tagName string) ([]model.PullRequest, error)

GetMergedPRsSinceTag returns PRs merged since the given tag.

func (*GitHubCollector) GetPRChecks

func (c *GitHubCollector) GetPRChecks(ctx context.Context, repo model.RepoRef, prNumber int) ([]model.CheckRun, error)

GetPRChecks returns the CI check runs for a PR.

func (*GitHubCollector) GetPRDetails

func (c *GitHubCollector) GetPRDetails(ctx context.Context, repo model.RepoRef, prNumber int) (*model.PullRequest, error)

GetPRDetails returns detailed information about a specific PR.

func (*GitHubCollector) ListDependencyPRs

func (c *GitHubCollector) ListDependencyPRs(ctx context.Context, repo model.RepoRef) ([]model.PullRequest, error)

ListDependencyPRs returns open dependency PRs for a repository.

func (*GitHubCollector) ListRepos

func (c *GitHubCollector) ListRepos(ctx context.Context, orgs []string, filter model.RepoFilter) ([]model.Repo, error)

ListRepos returns repositories matching the filter criteria.

func (*GitHubCollector) ListTags

func (c *GitHubCollector) ListTags(ctx context.Context, repo model.RepoRef) ([]model.Tag, error)

ListTags returns all tags for a repository.

func (*GitHubCollector) WaitForChecks

func (c *GitHubCollector) WaitForChecks(ctx context.Context, repo model.RepoRef, prNumber int, timeout time.Duration) ([]model.CheckRun, error)

WaitForChecks polls until all checks complete or timeout.

Jump to

Keyboard shortcuts

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