app/models/deploy.rb
def summary(show_project: false)
    project_name = " #{project&.name}" if show_project
    deploy_details = "#{short_reference} to#{project_name} #{stage&.name}"
    if ["cancelled", "cancelling"].include?(status)
      canceller_name = job.canceller&.name || "Samson"
      "#{canceller_name} #{summary_action} #{job.user.name}'s deploy#{deploy_buddy} of #{deploy_details}"
    else
      "#{job.user.name}#{deploy_buddy} #{summary_action} #{deploy_details}"
    end
  end
# job has almost identical code, keep it in sync
job has almost identical code, keep it in sync
job has almost identical code keep it in sync
def summary(show_project: false)
    project_name = " #{project&.name}" if show_project
    deploy_details = "#{short_reference} to#{project_name} #{stage&.name}"
    if ["cancelled", "cancelling"].include?(status)
      canceller_name = job.canceller&.name || "Samson"
      "#{canceller_name} #{summary_action} #{job.user.name}'s deploy#{deploy_buddy} of #{deploy_details}"
    else
      "#{job.user.name}#{deploy_buddy} #{summary_action} #{deploy_details}"
    end
  end
def summary ( show_project : false ) project_name = " #{project&.name}" if show_project deploy_details = "#{short_reference} to#{project_name} #{stage&.name}" if [ "cancelled" , "cancelling" ] . include? ( status ) canceller_name = job . canceller &. name || "Samson" "#{canceller_name} #{summary_action} #{job.user.name}'s deploy#{deploy_buddy} of #{deploy_details}" else "#{job.user.name}#{deploy_buddy} #{summary_action} #{deploy_details}" end end
job has almost identical code, keep it in sync
job has almost identical code keep it in sync
show_project