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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
33aeaf6a
Commit
33aeaf6a
authored
Mar 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge request title is in the notification
Short commit instead of long commit sha
parent
fcba2551
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+4
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-1
app/views/projects/merge_requests/widget/_show.html.haml
app/views/projects/merge_requests/widget/_show.html.haml
+3
-2
No files found.
app/assets/javascripts/merge_request_widget.js.coffee
View file @
33aeaf6a
...
@@ -42,6 +42,8 @@ class @MergeRequestWidget
...
@@ -42,6 +42,8 @@ class @MergeRequestWidget
getCIStatus
:
->
getCIStatus
:
->
urlToCICheck
=
@
opts
.
url_to_ci_check
urlToCICheck
=
@
opts
.
url_to_ci_check
_this
=
@
@
fetchBuildStatusInterval
=
setInterval
(
=>
@
fetchBuildStatusInterval
=
setInterval
(
=>
return
if
not
@
readyForCICheck
return
if
not
@
readyForCICheck
...
@@ -55,6 +57,7 @@ class @MergeRequestWidget
...
@@ -55,6 +57,7 @@ class @MergeRequestWidget
if
data
.
status
isnt
@
opts
.
current_status
if
data
.
status
isnt
@
opts
.
current_status
message
=
@
opts
.
ci_message
.
replace
(
'{{status}}'
,
@
ciLabelForStatus
(
data
.
status
))
message
=
@
opts
.
ci_message
.
replace
(
'{{status}}'
,
@
ciLabelForStatus
(
data
.
status
))
message
=
message
.
replace
(
'{{sha}}'
,
data
.
sha
)
message
=
message
.
replace
(
'{{sha}}'
,
data
.
sha
)
message
=
message
.
replace
(
'{{title}}'
,
data
.
title
)
notify
(
notify
(
"Build
#{
_this
.
ciLabelForStatus
(
data
.
status
)
}
"
,
"Build
#{
_this
.
ciLabelForStatus
(
data
.
status
)
}
"
,
...
@@ -62,7 +65,7 @@ class @MergeRequestWidget
...
@@ -62,7 +65,7 @@ class @MergeRequestWidget
@
opts
.
gitlab_icon
,
@
opts
.
gitlab_icon
,
->
->
@
close
()
@
close
()
Turbolinks
.
visit
"
#{
window
.
location
.
pathname
}
/builds"
Turbolinks
.
visit
_this
.
opts
.
builds_path
)
)
@
opts
.
current_status
=
data
.
status
@
opts
.
current_status
=
data
.
status
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
33aeaf6a
...
@@ -233,7 +233,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -233,7 +233,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
response
=
{
response
=
{
sha:
merge_request
.
last_commit
.
sha
,
title:
merge_request
.
title
,
sha:
merge_request
.
last_commit_short_sha
,
status:
status
,
status:
status
,
coverage:
coverage
coverage:
coverage
}
}
...
...
app/views/projects/merge_requests/widget/_show.html.haml
View file @
33aeaf6a
...
@@ -15,9 +15,10 @@
...
@@ -15,9 +15,10 @@
url_to_ci_check
:
"
#{
ci_status_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
,
url_to_ci_check
:
"
#{
ci_status_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
,
gitlab_icon
:
"
#{
asset_path
'gitlab_logo.png'
}
"
,
gitlab_icon
:
"
#{
asset_path
'gitlab_logo.png'
}
"
,
current_status
:
""
,
current_status
:
""
,
ci_message
:
"
Build {{status}} for {{sha}}
"
ci_message
:
"
Build {{status}} for {{title}}
\n
{{sha}}
"
,
builds_path
:
"
#{
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
};
};
if
(
typeof
merge_request_widget
===
'
undefined
'
)
{
if
(
typeof
merge_request_widget
===
'
undefined
'
)
{
merge_request_widget
=
new
MergeRequestWidget
(
opts
);
merge_request_widget
=
new
MergeRequestWidget
(
opts
);
}
}
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