Index > workflow

Namespace: workflow

Grit workflow management utilities.

Interfaces

WorkflowContextConfig

Properties

PropertyTypeDescription
currentStepIdstringThe current step ID, which may be nested via /
currentWorkflowIdstringThe workflow we are running
currentWorkflowSettingsWorkflowSettingsThe settings for the current workflow, merged automatically
topDirstringThe root directory for the current workspace

WorkflowSettings

Properties

PropertyTypeDescription
mode"grit" | "bun"-
workspaceLocation?"local" | "remote" | "auto"Allow using local repo context<br /><br />Default<br /><br />'auto'

Type Aliases

HealthGauge

HealthGauge: object

A title explaining the metric and a value between 0 and 100, representing how well the workflow is performing.

Type declaration

MemberTypeDescription
data?objectOptional input that was used to compute this score<br />This can be useful for historical analysis
description?string-
kind"gauge"-
titlestring-
valuenumber-

ProgressEstimate

ProgressEstimate: object

A projection of ongoing workflow progress according to a named metric.

Type declaration

MemberType
kind"progress-estimate"
namestring
totalnumber

ProgressIncrement

ProgressIncrement: object

Type declaration

MemberType
data?MatchResult
kind"progress-increment"
namestring

Functions

estimate

estimate(data): Promise< void >

Estimate total work for the current workflow, computed using workflow internal logic.

Parameters

ParameterType
dataProgressEstimate

Returns

Promise< void >


fail

fail(settings): Promise< void >

Fail the workflow for a specific reason.

Parameters

ParameterType
settingsobject
settings.messagestring

Returns

Promise< void >


increment

increment(data): Promise< void >

Increment the progress of the current workflow by one unit, according to a metric initialized with estimate.

Parameters

ParameterType
dataProgressIncrement

Returns

Promise< void >


markCheck

markCheck(group): Promise< void >

Mark a check that was run

Parameters

ParameterType
groupOmit< MetadataCheckItem, "__typename" | "kind" >

Returns

Promise< void >


markGroup

markGroup(group): Promise< void >

Save a migration group to the current workflow

Parameters

ParameterType
groupOmit< MigrationGroup, "__typename" | "kind" >

Returns

Promise< void >


markMatch

markMatch(match): Promise< void >

Save a match result to the current workflow

Parameters

ParameterType
matchMatchResult

Returns

Promise< void >


maybe_fail

maybe_fail(settings): Promise< void >

Prompt the user with an error message and allow them to either abort or continue If the promise resolves, the user has chosen to continue the current workflow.

Parameters

ParameterType
settingsobject
settings.messagestring

Returns

Promise< void >


prompt

prompt<T>(settings): Promise< T >

Prompt the user or outside system for input

Type parameters

Parameter
T extends string

Parameters

ParameterType
settingsPromptSettings< T >

Returns

Promise< T >


track

track(data): Promise< void >

Save health metadata for the current workflow, computed using workflow internal logic.

Parameters

ParameterType
dataHealthGauge

Returns

Promise< void >


Generated using TypeDoc and typedoc-plugin-markdown