contract

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package contract implements the GitHubEvent CR contract adapter — the one-way projection from the resolved runtime spec (resolve.ResolvedGitHubEventSpec) to the protobuf contract type (eventscontractv1alpha1.GitHubEventSpec).

The contract type is consumed by infrastructure-layer concerns only:

  • Execution hash computation for event deduplication
  • Event comparison across webhook redeliveries
  • Audit pipelines

Controllers and domain logic MUST NOT consume the returned contract value.

Event type mapping is non-fatal — unknown GitHub event type strings map to UNSPECIFIED rather than returning an error. GitHub may deliver event types the platform has not yet modelled; dropping them to UNSPECIFIED is preferable to failing the entire resolution pipeline.

The common proto wrapper pattern applies: EventType is projected as *v1.GitHubEventType with the enum value on the Type field.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToGitHubEventContract

ToGitHubEventContract projects the resolved runtime GitHubEvent spec into a protobuf eventscontractv1alpha1.GitHubEventSpec for infrastructure consumers (hashing, deduplication, comparison, audit).

EventType is projected as a *v1.GitHubEventType wrapper message with the enum value on the Type field.

CommitSha and EventId are identity fields preserved exactly as received from the GitHub webhook payload — no transformation applied.

⚠️ ONE-WAY adapter. The returned value MUST NOT be fed back into any controller or domain logic path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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