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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
8dcc8e5d
Commit
8dcc8e5d
authored
Oct 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix routing in CI mailer
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
82b6a17c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
10 deletions
+9
-10
app/models/project_services/ci/hip_chat_message.rb
app/models/project_services/ci/hip_chat_message.rb
+1
-1
app/models/project_services/ci/slack_message.rb
app/models/project_services/ci/slack_message.rb
+2
-2
app/models/project_services/gitlab_ci_service.rb
app/models/project_services/gitlab_ci_service.rb
+1
-1
app/views/ci/notify/build_fail_email.html.haml
app/views/ci/notify/build_fail_email.html.haml
+1
-1
app/views/ci/notify/build_fail_email.text.erb
app/views/ci/notify/build_fail_email.text.erb
+1
-1
app/views/ci/notify/build_success_email.html.haml
app/views/ci/notify/build_success_email.html.haml
+1
-1
app/views/ci/notify/build_success_email.text.erb
app/views/ci/notify/build_success_email.text.erb
+1
-1
spec/models/project_services/gitlab_ci_service_spec.rb
spec/models/project_services/gitlab_ci_service_spec.rb
+1
-2
No files found.
app/models/project_services/ci/hip_chat_message.rb
View file @
8dcc8e5d
...
@@ -11,7 +11,7 @@ module Ci
...
@@ -11,7 +11,7 @@ module Ci
def
to_s
def
to_s
lines
=
Array
.
new
lines
=
Array
.
new
lines
.
push
(
"<a href=
\"
#{
ci_project_url
(
project
)
}
\"
>
#{
project
.
name
}
</a> - "
)
lines
.
push
(
"<a href=
\"
#{
ci_project_url
(
project
)
}
\"
>
#{
project
.
name
}
</a> - "
)
lines
.
push
(
"<a href=
\"
#{
ci_
project_commits_url
(
project
,
commit
.
sha
)
}
\"
>Commit #
#{
commit
.
id
}
</a></br>"
)
lines
.
push
(
"<a href=
\"
#{
ci_
namespace_project_commit_url
(
commit
.
gl_project
.
namespace
,
commit
.
gl_
project
,
commit
.
sha
)
}
\"
>Commit #
#{
commit
.
id
}
</a></br>"
)
lines
.
push
(
"
#{
commit
.
short_sha
}
#{
commit
.
git_author_name
}
-
#{
commit
.
git_commit_message
}
</br>"
)
lines
.
push
(
"
#{
commit
.
short_sha
}
#{
commit
.
git_author_name
}
-
#{
commit
.
git_commit_message
}
</br>"
)
lines
.
push
(
"
#{
humanized_status
(
commit_status
)
}
in
#{
commit
.
duration
}
second(s)."
)
lines
.
push
(
"
#{
humanized_status
(
commit_status
)
}
in
#{
commit
.
duration
}
second(s)."
)
lines
.
join
(
''
)
lines
.
join
(
''
)
...
...
app/models/project_services/ci/slack_message.rb
View file @
8dcc8e5d
...
@@ -28,7 +28,7 @@ module Ci
...
@@ -28,7 +28,7 @@ module Ci
next
unless
build
.
failed?
next
unless
build
.
failed?
fields
<<
{
fields
<<
{
title:
build
.
name
,
title:
build
.
name
,
value:
"Build <
#{
ci_project_build_url
(
project
,
build
)
}
|
\#
#{
build
.
id
}
> failed in
#{
build
.
duration
.
to_i
}
second(s)."
value:
"Build <
#{
namespace_project_build_url
(
build
.
gl_project
.
namespace
,
build
.
gl_
project
,
build
)
}
|
\#
#{
build
.
id
}
> failed in
#{
build
.
duration
.
to_i
}
second(s)."
}
}
end
end
...
@@ -45,7 +45,7 @@ module Ci
...
@@ -45,7 +45,7 @@ module Ci
def
attachment_message
def
attachment_message
out
=
"<
#{
ci_project_url
(
project
)
}
|
#{
project_name
}
>: "
out
=
"<
#{
ci_project_url
(
project
)
}
|
#{
project_name
}
>: "
out
<<
"Commit <
#{
ci_
project_commits_url
(
project
,
commit
.
sha
)
}
|
\#
#{
commit
.
id
}
> "
out
<<
"Commit <
#{
ci_
namespace_project_commit_url
(
commit
.
gl_project
.
namespace
,
commit
.
gl_
project
,
commit
.
sha
)
}
|
\#
#{
commit
.
id
}
> "
out
<<
"(<
#{
commit_sha_link
}
|
#{
commit
.
short_sha
}
>) "
out
<<
"(<
#{
commit_sha_link
}
|
#{
commit
.
short_sha
}
>) "
out
<<
"of <
#{
commit_ref_link
}
|
#{
commit
.
ref
}
> "
out
<<
"of <
#{
commit_ref_link
}
|
#{
commit
.
ref
}
> "
out
<<
"by
#{
commit
.
git_author_name
}
"
if
commit
.
git_author_name
out
<<
"by
#{
commit
.
git_author_name
}
"
if
commit
.
git_author_name
...
...
app/models/project_services/gitlab_ci_service.rb
View file @
8dcc8e5d
...
@@ -71,7 +71,7 @@ class GitlabCiService < CiService
...
@@ -71,7 +71,7 @@ class GitlabCiService < CiService
def
build_page
(
sha
,
ref
)
def
build_page
(
sha
,
ref
)
if
project
.
gitlab_ci_project
.
present?
if
project
.
gitlab_ci_project
.
present?
ci_
project_commits_url
(
project
.
gitlab_ci_
project
,
sha
)
ci_
namespace_project_commit_url
(
project
.
namespace
,
project
,
sha
)
end
end
end
end
...
...
app/views/ci/notify/build_fail_email.html.haml
View file @
8dcc8e5d
...
@@ -16,4 +16,4 @@
...
@@ -16,4 +16,4 @@
Message:
#{
@build
.
commit
.
git_commit_message
}
Message:
#{
@build
.
commit
.
git_commit_message
}
%p
%p
Url:
#{
link_to
@build
.
short_sha
,
ci_project_build_url
(
@
project
,
@build
)
}
Url:
#{
link_to
@build
.
short_sha
,
namespace_project_build_url
(
@build
.
gl_project
.
namespace
,
@build
.
gl_
project
,
@build
)
}
app/views/ci/notify/build_fail_email.text.erb
View file @
8dcc8e5d
...
@@ -6,4 +6,4 @@ Author: <%= @build.commit.git_author_name %>
...
@@ -6,4 +6,4 @@ Author: <%= @build.commit.git_author_name %>
Branch:
<%=
@build
.
ref
%>
Branch:
<%=
@build
.
ref
%>
Message:
<%=
@build
.
commit
.
git_commit_message
%>
Message:
<%=
@build
.
commit
.
git_commit_message
%>
Url:
<%=
ci_project_build_url
(
@build
.
project
,
@build
)
%>
Url:
<%=
namespace_project_build_url
(
@build
.
gl_project
.
namespace
,
@build
.
gl_
project
,
@build
)
%>
app/views/ci/notify/build_success_email.html.haml
View file @
8dcc8e5d
...
@@ -17,4 +17,4 @@
...
@@ -17,4 +17,4 @@
Message:
#{
@build
.
commit
.
git_commit_message
}
Message:
#{
@build
.
commit
.
git_commit_message
}
%p
%p
Url:
#{
link_to
@build
.
short_sha
,
ci_project_build_url
(
@
project
,
@build
)
}
Url:
#{
link_to
@build
.
short_sha
,
namespace_project_build_url
(
@build
.
gl_project
.
namespace
,
@build
.
gl_
project
,
@build
)
}
app/views/ci/notify/build_success_email.text.erb
View file @
8dcc8e5d
...
@@ -6,4 +6,4 @@ Author: <%= @build.commit.git_author_name %>
...
@@ -6,4 +6,4 @@ Author: <%= @build.commit.git_author_name %>
Branch:
<%=
@build
.
ref
%>
Branch:
<%=
@build
.
ref
%>
Message:
<%=
@build
.
commit
.
git_commit_message
%>
Message:
<%=
@build
.
commit
.
git_commit_message
%>
Url:
<%=
ci_project_build_url
(
@build
.
project
,
@build
)
%>
Url:
<%=
namespace_project_build_url
(
@build
.
gl_project
.
namespace
,
@build
.
gl_
project
,
@build
)
%>
spec/models/project_services/gitlab_ci_service_spec.rb
View file @
8dcc8e5d
...
@@ -39,8 +39,7 @@ describe GitlabCiService do
...
@@ -39,8 +39,7 @@ describe GitlabCiService do
end
end
describe
:build_page
do
describe
:build_page
do
it
{
expect
(
@service
.
build_page
(
"2ab7834c"
,
'master'
)).
to
eq
(
"http://localhost/ci/projects/
#{
@ci_project
.
id
}
/commits/2ab7834c"
)}
it
{
expect
(
@service
.
build_page
(
"2ab7834c"
,
'master'
)).
to
eq
(
"http://localhost/
#{
@ci_project
.
gl_project
.
path_with_namespace
}
/commit/2ab7834c/ci"
)}
it
{
expect
(
@service
.
build_page
(
"issue#2"
,
'master'
)).
to
eq
(
"http://localhost/ci/projects/
#{
@ci_project
.
id
}
/commits/issue%232"
)}
end
end
describe
"execute"
do
describe
"execute"
do
...
...
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