diff options
Diffstat (limited to 'app/graphql/types/ci/pipeline_status_enum.rb')
-rw-r--r-- | app/graphql/types/ci/pipeline_status_enum.rb | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/app/graphql/types/ci/pipeline_status_enum.rb b/app/graphql/types/ci/pipeline_status_enum.rb index 2800454a999..c8e031e18ea 100644 --- a/app/graphql/types/ci/pipeline_status_enum.rb +++ b/app/graphql/types/ci/pipeline_status_enum.rb @@ -3,10 +3,24 @@ module Types module Ci class PipelineStatusEnum < BaseEnum - ::Ci::Pipeline.all_state_names.each do |state_symbol| - value state_symbol.to_s.upcase, - description: "#{::Ci::Pipeline::STATUSES_DESCRIPTION[state_symbol]}.", - value: state_symbol.to_s + STATUSES_DESCRIPTION = { + created: 'Pipeline has been created.', + waiting_for_resource: 'A resource (for example, a runner) that the pipeline requires to run is unavailable.', + preparing: 'Pipeline is preparing to run.', + pending: 'Pipeline has not started running yet.', + running: 'Pipeline is running.', + failed: 'At least one stage of the pipeline failed.', + success: 'Pipeline completed successfully.', + canceled: 'Pipeline was canceled before completion.', + skipped: 'Pipeline was skipped.', + manual: 'Pipeline needs to be manually started.', + scheduled: 'Pipeline is scheduled to run.' + }.freeze + + STATUSES_DESCRIPTION.each do |state, description| + value state.to_s.upcase, + description: description, + value: state.to_s end end end |