gitlab_webhook

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves POST /webhooks/gitlab/{external_connection_id} — the shared inbound endpoint for every trigger linked to one GitLab connection (see trigger_provider_links). Unlike tract_webhook.Handler (one trigger, its own secret/URL), auth here is against the connection's own webhook secret, and a single delivery may fan out to N triggers, each gated by its own TriggerMatchers (tract.MatchesRequest) — e.g. a gitlab_push trigger only fires on X-Gitlab-Event: Push Hook, so a Merge Request delivery to the same connection URL doesn't misfire it.

func New

func New(
	baseCtx context.Context,
	externalConns repository.ExternalConnectionRepo,
	triggers repository.TriggersRepo,
	momSvc service.MomService,
	tractSvc service.TractService,
) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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