Documentation
¶
Overview ¶
Package gitlab adapts a GitLab instance to the platform interface: group webhook parsing and project discovery.
Index ¶
- type GitLab
- func (g *GitLab) AllowsRepo(fullName string) bool
- func (g *GitLab) Client() *gogitlab.Client
- func (g *GitLab) DiscoverRepos(ctx context.Context) ([]platform.Repo, error)
- func (g *GitLab) Name() string
- func (g *GitLab) ParseWebhook(r *http.Request, body []byte) (*platform.Event, error)
- func (g *GitLab) Schedule() config.Schedule
- func (g *GitLab) WebhookPath() string
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 (*GitLab) AllowsRepo ¶ added in v0.5.0
AllowsRepo reports whether the repo is inside the configured groups.
func (*GitLab) DiscoverRepos ¶
DiscoverRepos lists all projects of the configured groups including subgroups, honoring the archived filter.
func (*GitLab) ParseWebhook ¶
ParseWebhook authenticates the request then 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).
Auth is dual-mode: when signingSecret is set and webhook-signature is present, verify the Standard Webhooks HMAC. Otherwise fall back to the legacy X-Gitlab-Token comparison against secret.
func (*GitLab) WebhookPath ¶
WebhookPath returns the HTTP path this platform's webhooks arrive on.