Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8b89ef86
Commit
8b89ef86
authored
Dec 17, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add templates for Emails on push
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
0b59af49
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletion
+44
-1
app/mailers/emails/projects.rb
app/mailers/emails/projects.rb
+1
-1
app/views/notify/repository_push_email.html.haml
app/views/notify/repository_push_email.html.haml
+23
-0
app/views/notify/repository_push_email.text.haml
app/views/notify/repository_push_email.text.haml
+20
-0
No files found.
app/mailers/emails/projects.rb
View file @
8b89ef86
...
@@ -16,7 +16,7 @@ module Emails
...
@@ -16,7 +16,7 @@ module Emails
def
repository_push_email
(
project_id
,
recipient
,
branch
,
compare
)
def
repository_push_email
(
project_id
,
recipient
,
branch
,
compare
)
@project
=
Project
.
find
project_id
@project
=
Project
.
find
project_id
@commits
=
compare
.
commits
@commits
=
Commit
.
decorate
compare
.
commits
@commit
=
compare
.
commit
@commit
=
compare
.
commit
@diffs
=
compare
.
diffs
@diffs
=
compare
.
diffs
@branch
=
branch
@branch
=
branch
...
...
app/views/notify/repository_push_email.html.haml
0 → 100644
View file @
8b89ef86
%h3
New push to
#{
@branch
}
at
#{
@project
.
name_with_namespace
}
%h4
Commits:
%ul
-
@commits
.
each
do
|
commit
|
%li
#{
commit
.
short_id
}
-
#{
commit
.
title
}
%h4
Diff:
-
@diffs
.
each
do
|
diff
|
%li
%strong
-
if
diff
.
old_path
==
diff
.
new_path
=
diff
.
new_path
-
elsif
diff
.
new_path
&&
diff
.
old_path
#{
diff
.
old_path
}
→
#{
diff
.
new_path
}
-
else
=
diff
.
new_path
||
diff
.
old_path
%hr
%pre
=
diff
.
diff
%br
app/views/notify/repository_push_email.text.haml
0 → 100644
View file @
8b89ef86
New push to
#{
@branch
}
at
#{
@project
.
name_with_namespace
}
\
Commits:
-
@commits
.
each
do
|
commit
|
#{
commit
.
short_id
}
-
#{
truncate
(
commit
.
title
,
length:
40
)
}
\
\
Diff:
-
@diffs
.
each
do
|
diff
|
\
\=====================================
-
if
diff
.
old_path
==
diff
.
new_path
=
diff
.
new_path
-
elsif
diff
.
new_path
&&
diff
.
old_path
#{
diff
.
old_path
}
→
#{
diff
.
new_path
}
-
else
=
diff
.
new_path
||
diff
.
old_path
\=====================================
=
diff
.
diff
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment