Skip to content

Commit d97a9aa

Browse files
author
gitlabhq
committed
fixed email markdown
1 parent 21f3da2 commit d97a9aa

File tree

6 files changed

+22
-4
lines changed

6 files changed

+22
-4
lines changed

app/mailers/notify.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class Notify < ActionMailer::Base
2+
add_template_helper ApplicationHelper
3+
24
default_url_options[:host] = EMAIL_OPTS["host"]
35
default_url_options[:protocol] = -> { EMAIL_OPTS["protocol"] ? EMAIL_OPTS["protocol"] : "http" }.call
46

app/views/notify/note_commit_email.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
%tr
1919
%td{:valign => "top"}
2020
%div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
21-
= RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
21+
= markdown(@note.note)
2222
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
2323

app/views/notify/note_issue_email.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
%tr
2121
%td{:valign => "top"}
2222
%div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
23-
= RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
23+
= markdown(@note.note)
2424
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
2525

app/views/notify/note_merge_request_email.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
%tr
1919
%td{:valign => "top"}
2020
%div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
21-
= RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
21+
= markdown(@note.note)
2222
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
2323

app/views/notify/note_wall_email.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
%tr
1919
%td{:valign => "top"}
2020
%div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
21-
= RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
21+
= markdown(@note.note)
2222
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}

spec/monkeypatch.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ def update_repository
1212
def path_to_repo
1313
File.join(Rails.root, "tmp", "tests", path)
1414
end
15+
16+
def satellite
17+
@satellite ||= FakeSatellite.new
18+
end
1519
end
1620

1721
class Key
@@ -29,3 +33,15 @@ def update_repository
2933
true
3034
end
3135
end
36+
37+
class FakeSatellite
38+
def exists?
39+
true
40+
end
41+
42+
def create
43+
true
44+
end
45+
end
46+
47+

0 commit comments

Comments
 (0)