def scheduledDeployFailureNotificationContents()

in riff-raff/app/notification/FailureNotificationContents.scala [58:108]


  def scheduledDeployFailureNotificationContents(
      scheduledDeployError: ScheduledDeployNotificationError,
      teamTargetsSearch: (UUID, DeployParameters) => List[Target],
      fallbackTargets: List[Target]
  ): NotificationContentsWithTargets = {
    val subject = "Scheduled Deployment failed to start"
    scheduledDeployError match {
      case SkippedDueToPreviousFailure(record) =>
        val redeployAction =
          Action("Redeploy manually", deployAgainUrl(record.uuid))
        val contents = NotificationContents(
          subject,
          scheduledDeployError.message,
          List(viewProblematicDeploy(record.uuid, "failed"), redeployAction)
        )
        NotificationContentsWithTargets(
          contents,
          teamTargetsSearch(record.uuid, record.parameters)
        )
      case SkippedDueToPreviousPartialDeploy(record) =>
        val redeployAction =
          Action("Redeploy manually", deployAgainUrl(record.uuid))
        val contents = NotificationContents(
          subject,
          scheduledDeployError.message,
          List(viewProblematicDeploy(record.uuid, "partial"), redeployAction)
        )
        NotificationContentsWithTargets(
          contents,
          teamTargetsSearch(record.uuid, record.parameters)
        )
      case SkippedDueToPreviousWaitingDeploy(record) =>
        val contents = NotificationContents(
          subject,
          scheduledDeployError.message,
          List(viewProblematicDeploy(record.uuid, "waiting"))
        )
        NotificationContentsWithTargets(contents, fallbackTargets)
      case NoDeploysFoundForStage(_, _) =>
        val scheduledDeployConfig = Action(
          "View Scheduled Deployment configuration",
          scheduledDeployConfigUrl
        )
        val contents = NotificationContents(
          subject,
          scheduledDeployError.message,
          List(scheduledDeployConfig)
        )
        NotificationContentsWithTargets(contents, fallbackTargets)
    }
  }