BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+4
-1
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-1
_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
getCIStatus
:
->
urlToCICheck
=
@
opts
.
url_to_ci_check
_this
=
@
@
fetchBuildStatusInterval
=
setInterval
(
=>
return
if
not
@
readyForCICheck
...
...
@@ -55,6 +57,7 @@ class @MergeRequestWidget
if
data
.
status
isnt
@
opts
.
current_status
message
=
@
opts
.
ci_message
.
replace
(
'{{status}}'
,
@
ciLabelForStatus
(
data
.
status
))
message
=
message
.
replace
(
'{{sha}}'
,
data
.
sha
)
message
=
message
.
replace
(
'{{title}}'
,
data
.
title
)
notify
(
"Build
#{
_this
.
ciLabelForStatus
(
data
.
status
)
}
"
,
...
...
@@ -62,7 +65,7 @@ class @MergeRequestWidget
@
opts
.
gitlab_icon
,
->
@
close
()
Turbolinks
.
visit
"
#{
window
.
location
.
pathname
}
/builds"
Turbolinks
.
visit
_this
.
opts
.
builds_path
)
@
opts
.
current_status
=
data
.
status
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
33aeaf6a
...
...
@@ -233,7 +233,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
response
=
{
sha:
merge_request
.
last_commit
.
sha
,
title:
merge_request
.
title
,
sha:
merge_request
.
last_commit_short_sha
,
status:
status
,
coverage:
coverage
}
...
...
app/views/projects/merge_requests/widget/_show.html.haml
View file @
33aeaf6a
...
...
@@ -15,9 +15,10 @@
url_to_ci_check
:
"
#{
ci_status_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
,
gitlab_icon
:
"
#{
asset_path
'gitlab_logo.png'
}
"
,
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'
)
{
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