Documentation
¶
Index ¶
- func TestsPassed(checkRuns []model.CheckRun) bool
- type Collector
- type GitHubCollector
- func (c *GitHubCollector) GetLatestRelease(ctx context.Context, repo model.RepoRef) (*model.Release, error)
- func (c *GitHubCollector) GetMergedPRsSinceTag(ctx context.Context, repo model.RepoRef, tagName string) ([]model.PullRequest, error)
- func (c *GitHubCollector) GetPRChecks(ctx context.Context, repo model.RepoRef, prNumber int) ([]model.CheckRun, error)
- func (c *GitHubCollector) GetPRDetails(ctx context.Context, repo model.RepoRef, prNumber int) (*model.PullRequest, error)
- func (c *GitHubCollector) ListDependencyPRs(ctx context.Context, repo model.RepoRef) ([]model.PullRequest, error)
- func (c *GitHubCollector) ListRepos(ctx context.Context, orgs []string, filter model.RepoFilter) ([]model.Repo, error)
- func (c *GitHubCollector) ListTags(ctx context.Context, repo model.RepoRef) ([]model.Tag, error)
- func (c *GitHubCollector) WaitForChecks(ctx context.Context, repo model.RepoRef, prNumber int, timeout time.Duration) ([]model.CheckRun, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestsPassed ¶
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.
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.
Click to show internal directories.
Click to hide internal directories.