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
Léo-Paul Géneau
gitlab-ce
Commits
843bc44a
Commit
843bc44a
authored
Apr 06, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preparing build text
parent
552cde76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+13
-3
app/views/projects/merge_requests/widget/_show.html.haml
app/views/projects/merge_requests/widget/_show.html.haml
+8
-1
No files found.
app/assets/javascripts/merge_request_widget.js.coffee
View file @
843bc44a
...
...
@@ -47,7 +47,7 @@ class @MergeRequestWidget
$
(
'.mr-state-widget'
).
replaceWith
(
data
)
ciLabelForStatus
:
(
status
)
->
if
status
==
'success'
if
status
is
'success'
'passed'
else
status
...
...
@@ -86,12 +86,22 @@ class @MergeRequestWidget
@
showCICoverage
data
.
coverage
if
showNotification
message
=
@
opts
.
ci_message
.
replace
(
'{{status}}'
,
@
ciLabelForStatus
(
data
.
status
))
status
=
@
ciLabelForStatus
(
data
.
status
)
if
status
is
"preparing"
title
=
@
opts
.
ci_title
.
preparing
status
=
status
.
charAt
(
0
).
toUpperCase
()
+
status
.
slice
(
1
);
message
=
@
opts
.
ci_message
.
preparing
.
replace
(
'{{status}}'
,
status
)
else
title
=
@
opts
.
ci_title
.
normal
message
=
@
opts
.
ci_message
.
normal
.
replace
(
'{{status}}'
,
status
)
title
=
title
.
replace
(
'{{status}}'
,
status
)
message
=
message
.
replace
(
'{{sha}}'
,
data
.
sha
)
message
=
message
.
replace
(
'{{title}}'
,
data
.
title
)
notify
(
"Build
#{
@
ciLabelForStatus
(
data
.
status
)
}
"
,
title
,
message
,
@
opts
.
gitlab_icon
,
->
...
...
app/views/projects/merge_requests/widget/_show.html.haml
View file @
843bc44a
...
...
@@ -14,8 +14,15 @@
ci_status_url
:
"
#{
ci_status_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
,
gitlab_icon
:
"
#{
asset_path
'gitlab_logo.png'
}
"
,
ci_status
:
""
,
ci_message
:
"
Build {{status}} for
\"
{{title}}
\"
"
,
ci_message
:
{
normal
:
"
Build {{status}} for
\"
{{title}}
\"
"
,
preparing
:
"
{{status}} build for
\"
{{title}}
\"
"
},
ci_enable
:
#{
@project
.
ci_service
?
"true"
:
"false"
}
,
ci_title
:
{
preparing
:
"
{{status}} build
"
,
normal
:
"
Build {{status}}
"
},
builds_path
:
"
#{
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
};
...
...
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