app/models/commit_status.rb
def only_production_status
    return if !@stage.production? || @stage.project.deployed_to_non_production_stage?(@commit)

    {
      state: "pending",
      statuses: [{
        state: "Production Only Reference",
        description: "#{@reference} has not been deployed to a non-production stage."
      }]
    }
  end
# Check if ref has been deployed to any non-production stages first if deploying to production
Check if ref has been deployed to any non-production stages first if deploying to production
Check if ref has been deployed to any non - production stages first if deploying to production
def only_production_status
    return if !@stage.production? || @stage.project.deployed_to_non_production_stage?(@commit)
    {
      state: "pending",
      statuses: [{
        state: "Production Only Reference",
        description: "#{@reference} has not been deployed to a non-production stage."
      }]
    }
  end
def only_production_status return if ! @stage . production? || @stage . project . deployed_to_non_production_stage? ( @commit ) { state : "pending" , statuses : [ { state : "Production Only Reference" , description : "#{@reference} has not been deployed to a non-production stage." } ] } end
Check if ref has been deployed to any non-production stages first if deploying to production
Check if ref has been deployed to any non - production stages first if deploying to production