Module: PlanMyStuff::Pipeline::Status

Defined in:
lib/plan_my_stuff/pipeline/status.rb

Overview

Canonical pipeline status constants.

Each constant holds the human-readable status name that maps to a GitHub Projects V2 single-select field value. Consuming apps can override display names via PlanMyStuff.configuration.pipeline_statuses but the canonical names here remain the internal identifiers.

Constant Summary collapse

STARTED =
'Started'
IN_REVIEW =
'In Review'
READY_FOR_RELEASE =
'Ready for Release'
RELEASE_IN_PROGRESS =
'Release in Progress'
COMPLETED =
'Completed'
ALL =

All statuses in pipeline order (frozen).

[
  STARTED,
  IN_REVIEW,
  READY_FOR_RELEASE,
  RELEASE_IN_PROGRESS,
  COMPLETED,
].freeze

Class Method Summary collapse

Class Method Details

.key_for(canonical) ⇒ String

Converts a canonical status name to a snake_case key suitable for notification event names.

Parameters:

  • canonical (String)

    one of the canonical status names

Returns:

  • (String)

    snake_case key (e.g. “ready_for_release”)



35
36
37
# File 'lib/plan_my_stuff/pipeline/status.rb', line 35

def self.key_for(canonical)
  canonical.downcase.tr(' ', '_')
end