Versions in this module Expand all Collapse all v0 v0.24.1 May 31, 2026 v0.24.0 May 30, 2026 Changes in this version + var ErrNoProvider = errors.New("no CI provider detected") + type AWSCodeBuild struct + func (a *AWSCodeBuild) BaseRef(ctx context.Context, repoPath string) (string, error) + func (a *AWSCodeBuild) Detect() bool + func (a *AWSCodeBuild) EnrichHeader(h http.Header) + func (a *AWSCodeBuild) HeadRef(ctx context.Context, repoPath string) (string, error) + func (a *AWSCodeBuild) PRNumber() (int, bool) + func (a *AWSCodeBuild) Platform() Platform + func (a *AWSCodeBuild) RepoSlug() (string, string, bool) + type AzureDevOps struct + func (a *AzureDevOps) BaseRef(ctx context.Context, repoPath string) (string, error) + func (a *AzureDevOps) Detect() bool + func (a *AzureDevOps) EnrichHeader(h http.Header) + func (a *AzureDevOps) HeadRef(ctx context.Context, repoPath string) (string, error) + func (a *AzureDevOps) PRNumber() (int, bool) + func (a *AzureDevOps) Platform() Platform + func (a *AzureDevOps) RepoSlug() (string, string, bool) + type BitbucketPipelines struct + func (b *BitbucketPipelines) BaseRef(ctx context.Context, repoPath string) (string, error) + func (b *BitbucketPipelines) Detect() bool + func (b *BitbucketPipelines) EnrichHeader(h http.Header) + func (b *BitbucketPipelines) HeadRef(ctx context.Context, repoPath string) (string, error) + func (b *BitbucketPipelines) PRNumber() (int, bool) + func (b *BitbucketPipelines) Platform() Platform + func (b *BitbucketPipelines) RepoSlug() (string, string, bool) + type CircleCI struct + func (c *CircleCI) BaseRef(ctx context.Context, repoPath string) (string, error) + func (c *CircleCI) Detect() bool + func (c *CircleCI) EnrichHeader(h http.Header) + func (c *CircleCI) HeadRef(ctx context.Context, repoPath string) (string, error) + func (c *CircleCI) PRNumber() (int, bool) + func (c *CircleCI) Platform() Platform + func (c *CircleCI) RepoSlug() (string, string, bool) + type GitHubActions struct + func (g *GitHubActions) BaseRef(ctx context.Context, repoPath string) (string, error) + func (g *GitHubActions) Detect() bool + func (g *GitHubActions) EnrichHeader(h http.Header) + func (g *GitHubActions) HeadRef(ctx context.Context, repoPath string) (string, error) + func (g *GitHubActions) PRNumber() (int, bool) + func (g *GitHubActions) Platform() Platform + func (g *GitHubActions) RepoSlug() (string, string, bool) + type GitLabCI struct + func (g *GitLabCI) BaseRef(ctx context.Context, repoPath string) (string, error) + func (g *GitLabCI) Detect() bool + func (g *GitLabCI) EnrichHeader(h http.Header) + func (g *GitLabCI) HeadRef(ctx context.Context, repoPath string) (string, error) + func (g *GitLabCI) PRNumber() (int, bool) + func (g *GitLabCI) Platform() Platform + func (g *GitLabCI) RepoSlug() (string, string, bool) + type GoogleCloudBuild struct + func (g *GoogleCloudBuild) BaseRef(ctx context.Context, repoPath string) (string, error) + func (g *GoogleCloudBuild) Detect() bool + func (g *GoogleCloudBuild) EnrichHeader(h http.Header) + func (g *GoogleCloudBuild) HeadRef(ctx context.Context, repoPath string) (string, error) + func (g *GoogleCloudBuild) PRNumber() (int, bool) + func (g *GoogleCloudBuild) Platform() Platform + func (g *GoogleCloudBuild) RepoSlug() (string, string, bool) + type Jenkins struct + func (j *Jenkins) BaseRef(ctx context.Context, repoPath string) (string, error) + func (j *Jenkins) Detect() bool + func (j *Jenkins) EnrichHeader(h http.Header) + func (j *Jenkins) HeadRef(ctx context.Context, repoPath string) (string, error) + func (j *Jenkins) PRNumber() (int, bool) + func (j *Jenkins) Platform() Platform + func (j *Jenkins) RepoSlug() (string, string, bool) + type Local struct + func (l *Local) BaseRef(ctx context.Context, repoPath string) (string, error) + func (l *Local) Detect() bool + func (l *Local) EnrichHeader(h http.Header) + func (l *Local) HeadRef(ctx context.Context, repoPath string) (string, error) + func (l *Local) PRNumber() (int, bool) + func (l *Local) Platform() Platform + func (l *Local) RepoSlug() (string, string, bool) + type Platform string + const PlatformAWSCodeBuild + const PlatformAzureDevOps + const PlatformBitbucketPipelines + const PlatformCircleCI + const PlatformGitHubActions + const PlatformGitLabCI + const PlatformGoogleCloudBuild + const PlatformJenkins + const PlatformOther + func (p Platform) String() string + type Provider interface + BaseRef func(ctx context.Context, repoPath string) (string, error) + Detect func() bool + EnrichHeader func(h http.Header) + HeadRef func(ctx context.Context, repoPath string) (string, error) + PRNumber func() (int, bool) + Platform func() Platform + RepoSlug func() (owner, name string, ok bool) + func Default() []Provider + func Detect(providers []Provider) (Provider, error) + func NewAWSCodeBuild() Provider + func NewAzureDevOps() Provider + func NewBitbucketPipelines() Provider + func NewCircleCI() Provider + func NewGitHubActions() Provider + func NewGitLabCI() Provider + func NewGoogleCloudBuild() Provider + func NewJenkins() Provider + func NewLocal() Provider