gitlab

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package gitlab adapts a GitLab instance to the platform interface: group webhook parsing and project discovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitLab

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

GitLab implements platform.Platform for a GitLab instance.

func New

func New(cfg config.Platform, log *slog.Logger) (*GitLab, error)

New builds a GitLab adapter from its platform config section.

func (*GitLab) AllowsRepo added in v0.5.0

func (g *GitLab) AllowsRepo(fullName string) bool

AllowsRepo reports whether the repo is inside the configured groups.

func (*GitLab) Client

func (g *GitLab) Client() *gogitlab.Client

Client exposes the authenticated API client for the gitlabci executor.

func (*GitLab) DiscoverRepos

func (g *GitLab) DiscoverRepos(ctx context.Context) ([]platform.Repo, error)

DiscoverRepos lists all projects of the configured groups including subgroups, honoring the archived filter.

func (*GitLab) Name

func (g *GitLab) Name() string

Name returns the platform's configured name.

func (*GitLab) ParseWebhook

func (g *GitLab) ParseWebhook(r *http.Request, body []byte) (*platform.Event, error)

ParseWebhook checks the X-Gitlab-Token and maps supported events (MR or issue description edits with newly checked boxes, default-branch push) to a run request; unsupported or irrelevant events return (nil, nil).

func (*GitLab) Schedule

func (g *GitLab) Schedule() config.Schedule

Schedule returns the platform's cron configuration.

func (*GitLab) WebhookPath

func (g *GitLab) WebhookPath() string

WebhookPath returns the HTTP path this platform's webhooks arrive on.

Jump to

Keyboard shortcuts

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