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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-12 00:09:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-12 00:09:40 +0300
commit213f46f188c29e9c442df61530110e172a7e819e (patch)
tree8544300e523c4e8cc3955406fa58e2d4b8ded773 /app/mailers
parent33f7ef81fd6bcab7bbdf0bc3f37d337256fb11fb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/imports.rb15
-rw-r--r--app/mailers/notify.rb1
-rw-r--r--app/mailers/previews/notify_preview.rb4
3 files changed, 20 insertions, 0 deletions
diff --git a/app/mailers/emails/imports.rb b/app/mailers/emails/imports.rb
new file mode 100644
index 00000000000..d3e8b90d686
--- /dev/null
+++ b/app/mailers/emails/imports.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Emails
+ module Imports
+ def github_gists_import_errors_email(user_id, errors)
+ @errors = errors
+ user = User.find(user_id)
+
+ email_with_layout(
+ to: user.notification_email_or_default,
+ subject: subject(s_('GithubImporter|GitHub Gists import finished with errors'))
+ )
+ end
+ end
+end
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 5a3fc70832c..31726563662 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -24,6 +24,7 @@ class Notify < ApplicationMailer
include Emails::InProductMarketing
include Emails::AdminNotification
include Emails::IdentityVerification
+ include Emails::Imports
helper TimeboxesHelper
helper MergeRequestsHelper
diff --git a/app/mailers/previews/notify_preview.rb b/app/mailers/previews/notify_preview.rb
index 7d7e01950c8..7ed594bf571 100644
--- a/app/mailers/previews/notify_preview.rb
+++ b/app/mailers/previews/notify_preview.rb
@@ -225,6 +225,10 @@ class NotifyPreview < ActionMailer::Preview
Notify.project_was_moved_email(project.id, user.id, "gitlab/gitlab").message
end
+ def github_gists_import_errors_email
+ Notify.github_gists_import_errors_email(user.id, { '12345' => 'Snippet maximum file count exceeded', '67890' => 'error message 2' }).message
+ end
+
private
def project