Feat v0.9.6 stage mode collapse (#80)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m49s
CI/CD / test-sqlite (push) Successful in 3m4s
CI/CD / build-and-deploy (push) Successful in 1m15s
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m49s
CI/CD / test-sqlite (push) Successful in 3m4s
CI/CD / build-and-deploy (push) Successful in 1m15s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #80.
This commit is contained in:
@@ -56,9 +56,9 @@ type WorkflowStage struct {
|
||||
Name string `json:"name"`
|
||||
AssignmentTeamID *string `json:"assignment_team_id,omitempty"`
|
||||
FormTemplate json.RawMessage `json:"form_template"`
|
||||
StageMode string `json:"stage_mode"` // form | review | delegated | automated
|
||||
StageMode string `json:"stage_mode"` // form | delegated | automated
|
||||
Audience string `json:"audience"` // team | public | system
|
||||
StageType string `json:"stage_type"` // simple | dynamic | automated
|
||||
StageType string `json:"stage_type"` // deprecated — retained for backward compatibility
|
||||
AutoTransition bool `json:"auto_transition"`
|
||||
StageConfig json.RawMessage `json:"stage_config"`
|
||||
BranchRules json.RawMessage `json:"branch_rules"`
|
||||
@@ -72,7 +72,6 @@ type WorkflowStage struct {
|
||||
|
||||
const (
|
||||
StageModeForm = "form"
|
||||
StageModeReview = "review"
|
||||
StageModeDelegated = "delegated"
|
||||
StageModeAutomated = "automated"
|
||||
)
|
||||
@@ -80,12 +79,22 @@ const (
|
||||
// ValidStageModes is the set of valid stage_mode values.
|
||||
var ValidStageModes = map[string]bool{
|
||||
StageModeForm: true,
|
||||
StageModeReview: true,
|
||||
StageModeDelegated: true,
|
||||
StageModeAutomated: true,
|
||||
}
|
||||
|
||||
// ── Stage Type Constants ────────────────────
|
||||
// NormalizeStageModeInput maps deprecated stage_mode values to their
|
||||
// replacements. "review" → "form"; all others pass through unchanged.
|
||||
func NormalizeStageModeInput(mode string) string {
|
||||
if mode == "review" {
|
||||
return StageModeForm
|
||||
}
|
||||
return mode
|
||||
}
|
||||
|
||||
// ── Stage Type Constants (deprecated) ───────
|
||||
// stage_type is redundant with starlark_hook presence and is no longer
|
||||
// validated. Constants are retained for backward-compatible references.
|
||||
|
||||
const (
|
||||
StageTypeSimple = "simple"
|
||||
@@ -93,13 +102,6 @@ const (
|
||||
StageTypeAutomated = "automated"
|
||||
)
|
||||
|
||||
// ValidStageTypes is the set of valid stage_type values.
|
||||
var ValidStageTypes = map[string]bool{
|
||||
StageTypeSimple: true,
|
||||
StageTypeDynamic: true,
|
||||
StageTypeAutomated: true,
|
||||
}
|
||||
|
||||
// ── Audience Constants ──────────────────────
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user