commit_status_enums.rb 518 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# frozen_string_literal: true

module CommitStatusEnums
  # Returns the Hash to use for creating the `failure_reason` enum for
  # `CommitStatus`.
  def self.failure_reasons
    {
      unknown_failure: nil,
      script_failure: 1,
      api_failure: 2,
      stuck_or_timeout_failure: 3,
      runner_system_failure: 4,
      missing_dependency_failure: 5,
      runner_unsupported: 6,
      stale_schedule: 7,
      job_execution_timeout: 8,
17 18
      archived_failure: 9,
      unmet_prerequisites: 10
19 20 21
    }
  end
end