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
db0e700d
Commit
db0e700d
authored
Oct 17, 2016
by
Grzegorz Bizon
Committed by
Annabel Dunstone Gray
Oct 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use all pipelines variable when creating merge request
parent
27c762b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-2
app/views/projects/merge_requests/_new_submit.html.haml
app/views/projects/merge_requests/_new_submit.html.haml
+4
-4
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
db0e700d
...
@@ -558,8 +558,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -558,8 +558,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@commit
=
@merge_request
.
diff_head_commit
@commit
=
@merge_request
.
diff_head_commit
@base_commit
=
@merge_request
.
diff_base_commit
@base_commit
=
@merge_request
.
diff_base_commit
@pipeline
=
@merge_request
.
pipeline
@pipeline
s
=
@merge_request
.
all_pipelines
@statuses
=
@pipeline
.
statuses
.
relevant
if
@pipeline
@statuses
=
@pipeline
s
.
first
.
statuses
.
relevant
if
@pipelines
.
any?
@note_counts
=
Note
.
where
(
commit_id:
@commits
.
map
(
&
:id
)).
@note_counts
=
Note
.
where
(
commit_id:
@commits
.
map
(
&
:id
)).
group
(
:commit_id
).
count
group
(
:commit_id
).
count
end
end
...
...
app/views/projects/merge_requests/_new_submit.html.haml
View file @
db0e700d
...
@@ -29,11 +29,11 @@
...
@@ -29,11 +29,11 @@
=
link_to
url_for
(
params
),
data:
{
target:
'div#commits'
,
action:
'new'
,
toggle:
'tab'
}
do
=
link_to
url_for
(
params
),
data:
{
target:
'div#commits'
,
action:
'new'
,
toggle:
'tab'
}
do
Commits
Commits
%span
.badge
=
@commits
.
size
%span
.badge
=
@commits
.
size
-
if
@pipeline
-
if
@pipeline
s
.
any?
%li
.builds-tab
%li
.builds-tab
=
link_to
url_for
(
params
),
data:
{
target:
'div#pipelines'
,
action:
'pipelines'
,
toggle:
'tab'
}
do
=
link_to
url_for
(
params
),
data:
{
target:
'div#pipelines'
,
action:
'pipelines'
,
toggle:
'tab'
}
do
Pipelines
Pipelines
%span
.badge
=
@
status
es
.
size
%span
.badge
=
@
pipelin
es
.
size
%li
.builds-tab
%li
.builds-tab
=
link_to
url_for
(
params
),
data:
{
target:
'div#builds'
,
action:
'builds'
,
toggle:
'tab'
}
do
=
link_to
url_for
(
params
),
data:
{
target:
'div#builds'
,
action:
'builds'
,
toggle:
'tab'
}
do
Builds
Builds
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
=
render
"projects/merge_requests/show/commits"
=
render
"projects/merge_requests/show/commits"
#diffs
.diffs.tab-pane
#diffs
.diffs.tab-pane
-
# This tab is always loaded via AJAX
-
# This tab is always loaded via AJAX
-
if
@pipeline
-
if
@pipeline
s
.
any?
#builds
.builds.tab-pane
#builds
.builds.tab-pane
=
render
"projects/merge_requests/show/builds"
=
render
"projects/merge_requests/show/builds"
#pipelines
.pipelines.tab-pane
#pipelines
.pipelines.tab-pane
...
@@ -65,5 +65,5 @@
...
@@ -65,5 +65,5 @@
:javascript
:javascript
var
merge_request
=
new
MergeRequest
({
var
merge_request
=
new
MergeRequest
({
action
:
"
#{
(
@show_changes_tab
?
'new/diffs'
:
'new'
)
}
"
,
action
:
"
#{
(
@show_changes_tab
?
'new/diffs'
:
'new'
)
}
"
,
buildsLoaded
:
"
#{
@pipeline
?
'true'
:
'false'
}
"
buildsLoaded
:
"
#{
@pipeline
s
.
any?
?
'true'
:
'false'
}
"
});
});
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