Documentation
¶
Overview ¶
internal/provider/bitbucket.go
internal/provider/github.go
internal/provider/provider.go
Index ¶
- type Bitbucket
- func (b *Bitbucket) CommitStats(ctx context.Context, repo model.Repo, hash string) (int64, int64, error)
- func (b *Bitbucket) ListCommits(ctx context.Context, repo model.Repo, limit int) ([]CommitInfo, error)
- func (b *Bitbucket) ListProjects(ctx context.Context, workspace string) ([]Project, error)
- func (b *Bitbucket) ListRepos(ctx context.Context, opts ListOpts) ([]model.Repo, error)
- type CommitInfo
- type CommitLister
- type GitHub
- type ListOpts
- type Project
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitbucket ¶
type Bitbucket struct {
// contains filtered or unexported fields
}
Bitbucket implements Provider for Bitbucket Cloud.
func NewBitbucket ¶
NewBitbucket creates a new Bitbucket provider. If baseURL is empty, the default Bitbucket Cloud API endpoint is used. If username is non-empty, Basic Auth is used instead of Bearer token auth.
func (*Bitbucket) CommitStats ¶ added in v0.7.0
func (b *Bitbucket) CommitStats(ctx context.Context, repo model.Repo, hash string) (int64, int64, error)
CommitStats fetches addition/deletion counts for a single Bitbucket commit.
func (*Bitbucket) ListCommits ¶ added in v0.7.0
func (b *Bitbucket) ListCommits(ctx context.Context, repo model.Repo, limit int) ([]CommitInfo, error)
ListCommits fetches up to limit commits for a repo via the Bitbucket API.
func (*Bitbucket) ListProjects ¶ added in v0.2.0
ListProjects fetches all projects in a Bitbucket workspace, handling pagination automatically.
type CommitInfo ¶ added in v0.7.0
CommitInfo represents a commit returned from a provider API.
type CommitLister ¶ added in v0.7.0
type CommitLister interface {
ListCommits(ctx context.Context, repo model.Repo, limit int) ([]CommitInfo, error)
CommitStats(ctx context.Context, repo model.Repo, hash string) (additions, deletions int64, err error)
}
CommitLister extends Provider with commit history capabilities.
type GitHub ¶
type GitHub struct {
// contains filtered or unexported fields
}
GitHub implements Provider for GitHub.
func NewGitHub ¶
NewGitHub creates a new GitHub provider. If baseURL is empty, the default GitHub API endpoint is used.
func (*GitHub) CommitStats ¶ added in v0.7.0
func (g *GitHub) CommitStats(ctx context.Context, repo model.Repo, hash string) (int64, int64, error)
CommitStats fetches addition/deletion counts for a single commit.
func (*GitHub) ListCommits ¶ added in v0.7.0
ListCommits fetches up to limit commits for a repo via the GitHub API.
type ListOpts ¶
type ListOpts struct {
Workspace string
Organization string
User string
Projects []string
Repos []string
Exclude []string
IncludeArchived bool
IncludeForks bool
}
ListOpts configures which repositories to retrieve from a provider.