jiradispatch

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package jiradispatch holds the Jira dispatch core shared by the production jira-poll driver (internal/cli) and the behaviour scenarios (pkg/behaviourtest): the CEL trigger matcher that turns a normalized event into jirapoll dispatch records, and the GitLab record dispatcher that recovers the embedded normalized event and starts the agent pipeline. Both callers carried their own copy of each before this package, so the scenarios exercised a mirror of the production path instead of the path itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventPipelineDispatcher

type EventPipelineDispatcher interface {
	DispatchJiraEvent(ctx context.Context, stage string, event *normevent.Event) error
}

EventPipelineDispatcher is the GitLab dispatch surface the record dispatcher needs; poll.Poller implements it.

type GitLabDispatcher

type GitLabDispatcher struct {
	Poller EventPipelineDispatcher
}

GitLabDispatcher is the jirapoll output driver for GitLab targets. It recovers the normalized event the CEL matcher embedded in the record's event_payload, validates it, and starts the agent pipeline for the record's agent.

func (GitLabDispatcher) Dispatch

func (d GitLabDispatcher) Dispatch(ctx context.Context, record jirapoll.DispatchRecord) error

Dispatch implements jirapoll.RecordDispatcher.

type Matcher

type Matcher struct {
	Candidates []harnessdispatch.TriggeredHarness
	Auth       harnessdispatch.AuthOptions
}

Matcher evaluates a normalized event against harness CEL triggers and returns one dispatch record per matching harness. Candidates are loaded once at construction and reused for every event in the cycle; Auth is the dispatch gate policy, derived by the production caller from the configured jira authorization provider and left at the zero value by the behaviour scenarios.

func (*Matcher) Match

Match evaluates the event against all CEL trigger candidates and returns dispatch records for each matching harness: events the gate policy refuses are dropped silently, and each matching harness is projected into a jirapoll.DispatchRecord carrying its execution ref and the normalized event as the record's event payload.

Jump to

Keyboard shortcuts

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