helpers

package
v0.19.1237 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppWorkflowsQueueName          = queuenames.AppWorkflowsQueueName
	AppSignalsQueueName            = queuenames.AppSignalsQueueName
	AppWorkflowStepGroupsQueueName = queuenames.AppWorkflowStepGroupsQueueName
	AppWorkflowStepsQueueName      = queuenames.AppWorkflowStepsQueueName
	AppGenerateStepsQueueName      = queuenames.AppGenerateStepsQueueName
	AppInstallSyncsQueueName       = queuenames.AppInstallSyncsQueueName
)
View Source
const AppBranchDefaultMaxInFlight = 25
View Source
const AppBranchSandboxBuildsQueueName = queuenames.AppBranchSandboxBuildsQueueName
View Source
const (
	DefaultAppBranchInstallGroupName = "default"
)

Variables

View Source
var ErrAppBranchNotFound = errors.New("app branch not found")

Functions

func ActiveAppConfigs added in v0.19.1126

func ActiveAppConfigs(appID string) func(*gorm.DB) *gorm.DB

ActiveAppConfigs restricts a query to the app's configs that finished syncing. A pending, syncing or errored config has no component_ids and no config records, so it must never stand in as the app's current config.

Ordering must be chained on the query builder by the caller, NOT added here: an Order clause inside a scope is dropped at execution time, which silently turns "newest active config" into First()'s primary-key ordering (i.e. the config with the smallest ID).

func BranchInstallsWithDB added in v0.19.1188

func BranchInstallsWithDB(ctx context.Context, db *gorm.DB, branchID string) ([]app.Install, error)

Callers inside a transaction must use this so they see their own writes.

func BranchPreviewConfigOrDefault added in v0.19.1158

func BranchPreviewConfigOrDefault(cfg *app.AppBranchConfig) app.AppBranchPreviewConfig

func GetActionReferences

func GetActionReferences(cfg *app.AppConfig, action string) []refs.Ref

func GetComponentReferences

func GetComponentReferences(cfg *app.AppConfig, comp string) []refs.Ref

NOTE(jm): this is a function, because it is used directly within a workflow.

func GetFakeSandboxStackData added in v0.19.850

func GetFakeSandboxStackData(appCfg *app.AppConfig, region string, stateMap map[string]interface{}) map[string]any

GetFakeSandboxStackData builds a fake stack output map for sandbox mode orgs, using real keys from the app config with random fake values. stateMap is used to render templated role names (e.g. "{{.install.name}}-admin"). NOTE: this is a standalone function because it is used directly within workflows.

func GetStackReferences

func GetStackReferences(cfg *app.AppConfig) []refs.Ref

func InstallGroupsMatching added in v0.19.1188

func InstallGroupsMatching(groups []app.AppBranchInstallGroup, install *app.Install) []string

func InstallMatchesGroup added in v0.19.1188

func InstallMatchesGroup(group *app.AppBranchInstallGroup, install *app.Install) bool

func IsEmail

func IsEmail(email string) bool

func LatestConfigInstallGroupsWithDB added in v0.19.1214

func LatestConfigInstallGroupsWithDB(ctx context.Context, db *gorm.DB, branchID string) ([]app.AppBranchInstallGroup, error)

func NoMatchingInstallGroupError added in v0.19.1214

func NoMatchingInstallGroupError(install *app.Install) error

func PreloadAppActionWorkflowConfigs

func PreloadAppActionWorkflowConfigs(db *gorm.DB) *gorm.DB

preload action workflow configs

func PreloadAppBreakGlassConfig

func PreloadAppBreakGlassConfig(db *gorm.DB) *gorm.DB

break glass config

func PreloadAppConfigComponentConfigConnections

func PreloadAppConfigComponentConfigConnections(db *gorm.DB) *gorm.DB

component config connections

func PreloadAppConfigInputConfig

func PreloadAppConfigInputConfig(db *gorm.DB) *gorm.DB

input config

func PreloadAppConfigKubernetesContextsConfig added in v0.19.1025

func PreloadAppConfigKubernetesContextsConfig(db *gorm.DB) *gorm.DB

kubernetes contexts config

func PreloadAppConfigPermissionsConfig

func PreloadAppConfigPermissionsConfig(db *gorm.DB) *gorm.DB

permissions config

func PreloadAppConfigPolicyConfig

func PreloadAppConfigPolicyConfig(db *gorm.DB) *gorm.DB

policies config

func PreloadAppConfigRunnerConfig

func PreloadAppConfigRunnerConfig(db *gorm.DB) *gorm.DB

runner config

func PreloadAppConfigSandboxConfig

func PreloadAppConfigSandboxConfig(db *gorm.DB) *gorm.DB

sandbox config

func PreloadAppConfigStackConfig

func PreloadAppConfigStackConfig(db *gorm.DB) *gorm.DB

cloudformation stack config

func PreloadAppOperationRoleConfig added in v0.19.807

func PreloadAppOperationRoleConfig(db *gorm.DB) *gorm.DB

component role config

func PreloadAppSecretsConfig

func PreloadAppSecretsConfig(db *gorm.DB) *gorm.DB

secrets config

func PreloadComponentConfigConnection added in v0.19.1231

func PreloadComponentConfigConnection(db *gorm.DB) *gorm.DB

func PreloadComponentConfigConnections

func PreloadComponentConfigConnections(db *gorm.DB) *gorm.DB

component config connections

func ReconcileBranchInstallAppBranchGroupsWithDB added in v0.19.1214

func ReconcileBranchInstallAppBranchGroupsWithDB(ctx context.Context, db *gorm.DB, branchID string, groups []app.AppBranchInstallGroup) error

func ReconcileInstallAppBranchGroupWithDB added in v0.19.1214

func ReconcileInstallAppBranchGroupWithDB(ctx context.Context, db *gorm.DB, installID string) error

func ResolveInstallGroup added in v0.19.1214

func ResolveInstallGroup(groups []app.AppBranchInstallGroup, install *app.Install) (*app.AppBranchInstallGroup, error)

func ResolveInstallGroupAssignment added in v0.19.1214

func ResolveInstallGroupAssignment(groups []app.AppBranchInstallGroup, install *app.Install) (*app.AppBranchInstallGroup, app.InstallAppBranchGroupAssignmentSource, error)

func SetInstallAppBranchGroupAssignmentWithDB added in v0.19.1214

func SetInstallAppBranchGroupAssignmentWithDB(ctx context.Context, db *gorm.DB, installID, branchID, group string, source app.InstallAppBranchGroupAssignmentSource) error

func SetInstallAppBranchGroupWithDB added in v0.19.1214

func SetInstallAppBranchGroupWithDB(ctx context.Context, db *gorm.DB, installID, branchID, group string) error

func SetInstallAppBranchWithDB added in v0.19.1188

func SetInstallAppBranchWithDB(ctx context.Context, db *gorm.DB, installID, branchID string) error

func ValidateBranchInstallsSingleGroupWithDB added in v0.19.1188

func ValidateBranchInstallsSingleGroupWithDB(ctx context.Context, db *gorm.DB, branchID string, groups []app.AppBranchInstallGroup) error

Callers inside a transaction must use this so they see their own writes.

func ValidateIgnoreChangesRegex added in v0.19.1159

func ValidateIgnoreChangesRegex(pattern string) error

ValidateIgnoreChangesRegex rejects patterns Go's regexp engine cannot compile so a bad expression fails at config time rather than mid-run.

func ValidateInstallSingleGroup added in v0.19.1188

func ValidateInstallSingleGroup(groups []app.AppBranchInstallGroup, install *app.Install) error

func WithDefaultInstallGroup added in v0.19.1214

func WithDefaultInstallGroup(groups []app.AppBranchInstallGroup) []app.AppBranchInstallGroup

withDefaultInstallGroup guarantees every config has somewhere for installs to land. A branch block that declares no install_groups, or an API caller that sends none, would otherwise produce a config where no install resolves to a group. Callers that declare groups must mark one default themselves; that is validated before it reaches here.

Types

type CreateAppBranchRunRequest added in v0.19.850

type CreateAppBranchRunRequest struct {
	AppBranchID            string
	AppBranchConfigID      string
	AppConfigID            string
	Force                  bool
	RunType                app.AppBranchRunType
	PlanOnly               bool
	EventType              string
	PRNumber               *int
	HeadSHA                string
	GitRef                 string
	BaseBranch             string
	IsDraftMode            bool
	Metadata               app.AppBranchRunMetadata
	Labels                 labels.Labels
	TriggerEventDispatchID *string
	Preview                *PreviewRunInput
	Request                *app.WorkflowRequest
}

type EnsureAppBranchQueuesOptions added in v0.19.1197

type EnsureAppBranchQueuesOptions struct {
	SkipRestartHint bool
}

type Helpers

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

func New

func New(params Params) *Helpers

func (*Helpers) BranchInstalls added in v0.19.1188

func (h *Helpers) BranchInstalls(ctx context.Context, branchID string) ([]app.Install, error)

BranchInstalls returns the installs the branch owns, which is the only population any of its install groups can resolve to.

func (*Helpers) BuildAppBranchRunPreview added in v0.19.1158

func (h *Helpers) BuildAppBranchRunPreview(
	ctx context.Context,
	appID string,
	branchConfig *app.AppBranchConfig,
	input *PreviewRunInput,
) (*app.AppBranchRunPreview, error)

func (*Helpers) CliVerisionAllowed

func (h *Helpers) CliVerisionAllowed(ctx context.Context, version string) (bool, error)

func (*Helpers) CreateAppBranch

func (h *Helpers) CreateAppBranch(
	ctx context.Context,
	appID string,
	name string,
	opts ...app.AppBranchManagedBy,
) (*app.AppBranch, error)

func (*Helpers) CreateAppBranchConfig added in v0.19.850

func (h *Helpers) CreateAppBranchConfig(
	ctx context.Context,
	appBranchID string,
	connectedGithubVCSConfig *app.ConnectedGithubVCSConfig,
	publicGitVCSConfig *app.PublicGitVCSConfig,
	installGroups []app.AppBranchInstallGroup,
	postDeployRunbookIDs *[]string,
	ignoreChanges *IgnoreChangesSettings,
	previewConfig *app.AppBranchPreviewConfig,
	clearPreviewConfig bool,
	runConfig *app.AppBranchRunConfig,
) (*app.AppBranchConfig, error)

func (*Helpers) CreateAppBranchConfigWithDB added in v0.19.1133

func (h *Helpers) CreateAppBranchConfigWithDB(
	ctx context.Context,
	db *gorm.DB,
	appBranchID string,
	connectedGithubVCSConfig *app.ConnectedGithubVCSConfig,
	publicGitVCSConfig *app.PublicGitVCSConfig,
	installGroups []app.AppBranchInstallGroup,
	postDeployRunbookIDs *[]string,
	ignoreChanges *IgnoreChangesSettings,
	previewConfig *app.AppBranchPreviewConfig,
	clearPreviewConfig bool,
	runConfig *app.AppBranchRunConfig,
) (*app.AppBranchConfig, error)

Callers inside a transaction must use this, or the app_branch_id FK fails.

func (*Helpers) CreateAppBranchRun added in v0.19.850

func (h *Helpers) CreateAppBranchRun(ctx context.Context, req *CreateAppBranchRunRequest) (*app.AppBranchRun, error)

func (*Helpers) CreateAppBranchWithDB added in v0.19.1131

func (h *Helpers) CreateAppBranchWithDB(
	ctx context.Context,
	db *gorm.DB,
	appID string,
	name string,
	opts ...app.AppBranchManagedBy,
) (*app.AppBranch, error)

Queue creation starts Temporal workflows, so a transactional caller must call EnsureAppBranchQueues itself once committed.

func (*Helpers) CreateAppSandboxQueue added in v0.19.850

func (h *Helpers) CreateAppSandboxQueue(ctx context.Context, appID string) error

CreateAppSandboxQueue creates a Temporal queue for the app's sandbox build workflow. This enables sandbox-build signals to be enqueued and processed against the app.

func (*Helpers) CreateAppWorkflow added in v0.19.903

func (s *Helpers) CreateAppWorkflow(ctx context.Context,
	appID string,
	workflowType app.WorkflowType,
	metadata map[string]string,
	planOnly bool,
) (*app.Workflow, error)

func (*Helpers) CreateAppWorkflowWithRequest added in v0.19.1231

func (s *Helpers) CreateAppWorkflowWithRequest(ctx context.Context,
	appID string,
	workflowType app.WorkflowType,
	metadata map[string]string,
	planOnly bool,
	wfRequest *app.WorkflowRequest,
) (*app.Workflow, error)

func (*Helpers) CreateWorkflow

func (s *Helpers) CreateWorkflow(ctx context.Context,
	appBranchID string,
	workflowType app.WorkflowType,
	metadata map[string]string,
	planOnly bool,
) (*app.Workflow, error)

func (*Helpers) CreateWorkflowWithDB added in v0.19.1096

func (s *Helpers) CreateWorkflowWithDB(ctx context.Context, db *gorm.DB, ownerID, ownerType string, workflowType app.WorkflowType, metadata map[string]string, planOnly bool, approvalOption app.InstallApprovalOption, role string) (*app.Workflow, error)

func (*Helpers) DeleteAppComponent

func (s *Helpers) DeleteAppComponent(ctx context.Context, compID string) error

func (*Helpers) EnqueueAppBranchConfigSignals added in v0.19.1197

func (h *Helpers) EnqueueAppBranchConfigSignals(ctx context.Context, appBranchID, appBranchConfigID string) error

func (*Helpers) EnqueueAppBranchCreatedIfFirst added in v0.19.1164

func (h *Helpers) EnqueueAppBranchCreatedIfFirst(ctx context.Context, appBranchID, appBranchConfigID string) error

EnqueueAppBranchCreatedIfFirst enqueues app-branch-created when configID is the branch's first AppBranchConfig. Later configs are ignored. DedupeKey makes a retry of the first config a no-op.

func (*Helpers) EnsureAppBranchQueue added in v0.19.850

func (h *Helpers) EnsureAppBranchQueue(ctx context.Context, branchID string) error

EnsureAppBranchQueue creates Temporal queue workflows for the given app branch. Safe to call multiple times — queueClient.Create is idempotent.

func (*Helpers) EnsureAppBranchQueues added in v0.19.1131

func (h *Helpers) EnsureAppBranchQueues(ctx context.Context, branchID string, opts ...EnsureAppBranchQueuesOptions) error

func (*Helpers) EnsureAppQueue added in v0.19.903

func (h *Helpers) EnsureAppQueue(ctx context.Context, appID string) error

EnsureAppQueue creates all Temporal queue workflows needed for an app to execute workflows through the shared flow infrastructure.

func (*Helpers) EnsureAppTriggerQueue added in v0.19.1096

func (h *Helpers) EnsureAppTriggerQueue(ctx context.Context, appID string) (*app.Queue, error)

func (*Helpers) FetchAppBranchesWithConfigs added in v0.19.850

func (h *Helpers) FetchAppBranchesWithConfigs(ctx context.Context, appID string) ([]app.AppBranch, error)

FetchAppBranchesWithConfigs retrieves all app branches for an app with their configs preloaded

func (*Helpers) FindBaseAppBranchRun added in v0.19.1153

func (h *Helpers) FindBaseAppBranchRun(ctx context.Context, appBranchID string) (*app.AppBranchRun, error)

FindBaseAppBranchRun returns the most recent non-preview run on the app branch that parsed an app config and finished component builds. The run's overall status is not required to be success: a later deploy failure still leaves a usable baseline.

func (*Helpers) FindBaseAppBranchRunForHead added in v0.19.1188

func (h *Helpers) FindBaseAppBranchRunForHead(ctx context.Context, headRun *app.AppBranchRun) (*app.AppBranchRun, error)

FindBaseAppBranchRunForHead resolves preview baselines from the git branch a pull request targets. Regular branch runs compare with the previous parsed build on the same app branch.

func (*Helpers) GetAppBundleAppConfig added in v0.19.1231

func (h *Helpers) GetAppBundleAppConfig(ctx context.Context, orgID, appID, appConfigID string) (*app.AppConfig, error)

func (*Helpers) GetAppComponents

func (s *Helpers) GetAppComponents(ctx context.Context, appID string) ([]app.Component, error)

func (*Helpers) GetAppComponentsAtConfigVersion

func (h *Helpers) GetAppComponentsAtConfigVersion(ctx context.Context, appID string, appCfgVersion int, componentIDs []string) ([]app.Component, error)

This returns all app components for a point in time

func (*Helpers) GetAppInstalls

func (s *Helpers) GetAppInstalls(ctx context.Context, appID string) ([]app.Install, error)

func (*Helpers) GetComponentDependents

func (h *Helpers) GetComponentDependents(ctx context.Context, appCfgID string, compID string) ([]string, error)

func (*Helpers) GetComponents

func (s *Helpers) GetComponents(ctx context.Context, compIDs []string) ([]app.Component, error)

func (*Helpers) GetConfigComponentDeployOrder

func (h *Helpers) GetConfigComponentDeployOrder(ctx context.Context, cfg *app.AppConfig, compID string) ([]string, error)

func (*Helpers) GetConfigDefaultComponentOrder

func (h *Helpers) GetConfigDefaultComponentOrder(ctx context.Context, cfg *app.AppConfig) ([]string, error)

func (*Helpers) GetConfigGraph

func (h *Helpers) GetConfigGraph(ctx context.Context, cfg *app.AppConfig) (graph.Graph[string, *app.Component], error)

GetConfigGraph builds a directed acyclic graph of component dependencies and returns both the graph and a sorted list of components in deployment order (dependencies first)

func (*Helpers) GetConfigReverseDefaultComponentOrder

func (h *Helpers) GetConfigReverseDefaultComponentOrder(ctx context.Context, cfg *app.AppConfig) ([]string, error)

func (*Helpers) GetFullAppConfig

func (h *Helpers) GetFullAppConfig(ctx context.Context, appConfigID string, skipAdditionalChecks bool) (*app.AppConfig, error)

func (*Helpers) GetLatestActiveAppConfig added in v0.19.1123

func (h *Helpers) GetLatestActiveAppConfig(ctx context.Context, appID string) (*app.AppConfig, error)

GetLatestActiveAppConfig returns the app's newest active config with component config connections preloaded.

func (*Helpers) GetLatestActiveAppConfigBare added in v0.19.1123

func (h *Helpers) GetLatestActiveAppConfigBare(ctx context.Context, appID string) (*app.AppConfig, error)

GetLatestActiveAppConfigBare returns the app's newest active config without preloading children.

func (*Helpers) GetLatestActiveAppConfigForBranch added in v0.19.1153

func (h *Helpers) GetLatestActiveAppConfigForBranch(ctx context.Context, appID, branchID string) (*app.AppConfig, error)

func (*Helpers) GetPoliciesConfigByAppConfigID

func (h *Helpers) GetPoliciesConfigByAppConfigID(ctx context.Context, appConfigID string) (*app.AppPoliciesConfig, error)

func (*Helpers) GetReverseConfigComponentDeployOrder

func (h *Helpers) GetReverseConfigComponentDeployOrder(ctx context.Context, cfg *app.AppConfig, compID string) ([]string, error)

func (*Helpers) LatestConfigInstallGroups added in v0.19.1146

func (h *Helpers) LatestConfigInstallGroups(ctx context.Context, branchID string) ([]app.AppBranchInstallGroup, error)

LatestConfigInstallGroups returns the install groups on a branch's newest config, or nothing when the branch has no config yet.

func (*Helpers) ListPreviewInstallCandidates added in v0.19.1158

func (h *Helpers) ListPreviewInstallCandidates(
	ctx context.Context,
	appID string,
	_ string,
	_ app.AppBranchPreviewConfig,
) ([]app.Install, error)

func (*Helpers) ListPreviewSources added in v0.19.1158

func (h *Helpers) ListPreviewSources(ctx context.Context, branch *app.AppBranch, config *app.AppBranchConfig) (*ListPreviewSourcesResult, error)

func (*Helpers) QueueClient added in v0.19.1101

func (h *Helpers) QueueClient() *queueclient.Client

QueueClient returns the queue client for enqueueing app-owned signals.

func (*Helpers) ReconcileInstallAppBranchGroup added in v0.19.1214

func (h *Helpers) ReconcileInstallAppBranchGroup(ctx context.Context, installID string) error

func (*Helpers) ResolvePreviewBaselineAppConfig added in v0.19.1158

func (h *Helpers) ResolvePreviewBaselineAppConfig(ctx context.Context, runID, appBranchID string) (*PreviewBaselineAppConfig, error)

func (*Helpers) ResolvePreviewInstallID added in v0.19.1158

func (h *Helpers) ResolvePreviewInstallID(
	ctx context.Context,
	appID string,
	cfg app.AppBranchPreviewConfig,
	overrideInstallID *string,
) (installID, installName string, err error)

func (*Helpers) ResumeAppBranchRun added in v0.19.1096

func (*Helpers) SetInstallAppBranch added in v0.19.1188

func (h *Helpers) SetInstallAppBranch(ctx context.Context, installID, branchID string) error

func (*Helpers) SetInstallAppBranchGroup added in v0.19.1214

func (h *Helpers) SetInstallAppBranchGroup(ctx context.Context, installID, branchID, group string) error

func (*Helpers) SetInstallAppBranchGroupAssignment added in v0.19.1214

func (h *Helpers) SetInstallAppBranchGroupAssignment(ctx context.Context, installID, branchID, group string, source app.InstallAppBranchGroupAssignmentSource) error

func (*Helpers) TriggerAppBranchRun added in v0.19.1096

func (*Helpers) UploadCustomNestedStackTemplates added in v0.19.1214

func (h *Helpers) UploadCustomNestedStackTemplates(ctx context.Context, db *gorm.DB, stackConfig *app.AppStackConfig) error

UploadCustomNestedStackTemplates uploads the config's custom nested stack templates and persists the resulting hashes and ready status. This runs inline with the config write so a stack generated from the config always finds its templates already in S3.

func (*Helpers) VCSHelpers added in v0.19.850

func (h *Helpers) VCSHelpers() *vcshelpers.Helpers

VCSHelpers returns the VCS helpers for git source resolution and token creation.

func (*Helpers) ValidateBranchInstallsSingleGroup added in v0.19.1188

func (h *Helpers) ValidateBranchInstallsSingleGroup(ctx context.Context, branchID string, groups []app.AppBranchInstallGroup) error

func (*Helpers) ValidateGraph

func (h *Helpers) ValidateGraph(ctx context.Context, appID string) error

func (*Helpers) ValidateInstallLabelsSingleGroup added in v0.19.1188

func (h *Helpers) ValidateInstallLabelsSingleGroup(ctx context.Context, install *app.Install, newLabels labels.Labels) error

func (*Helpers) ValidateSameRepo added in v0.19.850

func (h *Helpers) ValidateSameRepo(
	branches []app.AppBranch,
	vcsConfigReq *vcshelpers.VCSConfigRequest,
) error

ValidateSameRepo validates that all app branches use the same repository as the provided request Accepts the VCS config request (before creation) to validate early If both publicRepoReq and connectedRepoReq are nil, returns early with no validation Branches with no VCS config (both nil) are ignored during validation

type IgnoreChangesSettings added in v0.19.1159

type IgnoreChangesSettings struct {
	Regex                *string
	SendStatusesOnIgnore *bool
}

IgnoreChangesSettings carries the ignore-changes fields through config creation. A nil pointer on either field means "carry the previous config's value forward", matching how the rest of this helper treats omitted input.

type ListPreviewSourcesResult added in v0.19.1158

type ListPreviewSourcesResult struct {
	PullRequests []PreviewSourcePR     `json:"pull_requests"`
	Branches     []PreviewSourceBranch `json:"branches"`
}

type Params

type Params struct {
	fx.In

	Cfg         *internal.Config
	GhClient    *github.Client
	DB          *gorm.DB `name:"psql"`
	V           *validator.Validate
	L           *zap.Logger
	VcsHelpers  *vcshelpers.Helpers
	QueueClient *queueclient.Client
}

type PreviewBaselineAppConfig added in v0.19.1158

type PreviewBaselineAppConfig struct {
	AppConfigID string
	BaseRunID   string
}

type PreviewRunInput added in v0.19.1158

type PreviewRunInput struct {
	Source           app.AppBranchRunPreviewSource
	PRNumber         *int
	GitRef           string
	HeadSHA          string
	InputAppConfigID string
	IsDraftMode      bool
	Override         *app.AppBranchPreviewOverride
}

func MapLegacyPlanOnlyToPreviewInput added in v0.19.1158

func MapLegacyPlanOnlyToPreviewInput(req *CreateAppBranchRunRequest) *PreviewRunInput

type PreviewSourceBranch added in v0.19.1158

type PreviewSourceBranch struct {
	Name string `json:"name"`
	SHA  string `json:"sha,omitempty"`
}

type PreviewSourcePR added in v0.19.1158

type PreviewSourcePR struct {
	PRNumber int    `json:"pr_number"`
	Title    string `json:"title"`
	HeadSHA  string `json:"head_sha"`
	HeadRef  string `json:"head_ref"`
	URL      string `json:"url"`
}

type ResolvedPreviewRun added in v0.19.1158

type ResolvedPreviewRun struct {
	Preview *app.AppBranchRunPreview
}

type TriggerAppBranchRunRequest added in v0.19.1096

type TriggerAppBranchRunRequest struct {
	Run       CreateAppBranchRunRequest
	QueueID   string
	Metadata  map[string]string
	Callback  callback.Ref
	DedupeKey *string

	// ApprovalOption gates the run's plan steps. Empty means prompt.
	ApprovalOption app.InstallApprovalOption
}

type TriggerAppBranchRunResponse added in v0.19.1096

type TriggerAppBranchRunResponse struct {
	Run           *app.AppBranchRun
	Workflow      *app.Workflow
	QueueSignalID string
}

Jump to

Keyboard shortcuts

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