Welcome to mirror list, hosted at ThFree Co, Russian Federation.

auto_devops.rb « emails « mailers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9705a3052d49dc92a887ce87be0e3842a90883ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Emails
  module AutoDevops
    def autodevops_disabled_email(pipeline, recipient)
      @pipeline = pipeline
      @project = pipeline.project

      add_project_headers

      mail(to: recipient,
           subject: auto_devops_disabled_subject(@project.name)) do |format|
        format.html { render layout: 'mailer' }
        format.text { render layout: 'mailer' }
      end
    end

    private

    def auto_devops_disabled_subject(project_name)
      subject("Auto DevOps pipeline was disabled for #{project_name}")
    end
  end
end