Return nil instead of '0.0' - total_ci_minutes_consumed

Problem

Currently we return 0.0 for the method total_ci_minutes_consumed. We don't display 0 to the user for compute credits so returning nil would be better. Especially for our FE code to not do an explicit string check based on visibility.

Solution

  • Refactor total_ci_minutes_consumed within ee/app/models/ee/ci/pipeline.rb to return nil when zero based.
  • Update app/assets/javascripts/pipelines/components/pipeline_details_header.vue showComputeMinutes computed property to not check for explicit string
Edited by Payton Burdette