summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-21 16:19:07 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-21 16:19:07 +0800
commit637a41400ccaf853745dc208b5e583651b579a9d (patch)
treecd71b397fb57d00dd4c914732803bb73f7b892a9 /app/mailers
parent63e03dada7e754a92ca088c683f4189424ab34b1 (diff)
parent49405ac746a8aa2a4854d14e4a8cb6539535b1a5 (diff)
downloadgitlab-ce-637a41400ccaf853745dc208b5e583651b579a9d.tar.gz
Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (206 commits) Implement fourth round of comments from @DouweM. Fix `CreateDeploymentService` spec. Reload issues in spec to ensure label<->issue mapping properly loaded Fix build. Remove unnecessary #{} in cycle analytics template. Update cycle analytics icon and fix color of the dismiss button. Use triple dashes for the empty value in cycle analytics. Fix typo on cycle analytics copy. Add page title and fix sub menu width in Cycle Analytics page. Update Cycle Analytics Read more link URL. Display the cycle analytics navbar based on the `:read_cycle_analytics` ability. Improve indentation in `Gitlab::Database::Median` Add a spec for merge request metric caching while refreshing a merge request from a forked project. Use the `IssuableBaseService` lifecycle hooks to cache `MergeRequestsClosingIssues` Implement a second round of review comments from @DouweM. Add docs on Cycle Analytics Test if issue authors can access private projects Update .pkgr.yml with Ubuntu 16.04 dependencies fix issues mr counter Move JSON generation (cycle analytics) into a controller method. ...
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index fef8149b325..aa6b9da82dd 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -109,6 +109,12 @@ class Notify < BaseMailer
headers["X-GitLab-#{model.class.name}-ID"] = model.id
headers['X-GitLab-Reply-Key'] = reply_key
+ if !@labels_url && @sent_notification && @sent_notification.unsubscribable?
+ headers['List-Unsubscribe'] = unsubscribe_sent_notification_url(@sent_notification, force: true)
+
+ @sent_notification_url = unsubscribe_sent_notification_url(@sent_notification)
+ end
+
if Gitlab::IncomingEmail.enabled?
address = Mail::Address.new(Gitlab::IncomingEmail.reply_address(reply_key))
address.display_name = @project.name_with_namespace