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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d169737f
Commit
d169737f
authored
Nov 21, 2017
by
micael.bergeron
Committed by
Micaël Bergeron
Dec 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidying up the changes
parent
a3ac684e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-3
app/models/merge_request.rb
app/models/merge_request.rb
+0
-9
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+13
-6
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
d169737f
...
...
@@ -9,11 +9,8 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
prepend
::
EE
::
Projects
::
MergeRequestsController
skip_before_action
:merge_request
,
only:
[
:index
,
:bulk_update
]
before_action
:authorize_update_issuable!
,
only:
[
:close
,
:edit
,
:update
,
:remove_wip
,
:sort
]
before_action
:set_issuables_index
,
only:
[
:index
]
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
def
index
...
...
app/models/merge_request.rb
View file @
d169737f
...
...
@@ -1042,13 +1042,4 @@ class MergeRequest < ActiveRecord::Base
project
.
merge_requests
.
merged
.
where
(
author_id:
author_id
).
empty?
end
def
banzai_render_context
(
field
)
# this will be used to reference these commit in the context of the MR
# the URL are built differently
{
merge_request:
self
,
mr_commit_shas:
all_commit_shas
}
end
end
app/views/projects/commits/_commit.html.haml
View file @
d169737f
-
view_details
=
local_assigns
.
fetch
(
:view_details
,
false
)
-
view_details
=
local_assigns
.
fetch
(
:view_details
,
false
)
-
merge_request
=
local_assigns
.
fetch
(
:merge_request
,
nil
)
-
project
=
local_assigns
.
fetch
(
:project
)
{
merge_request
&
.
project
}
-
ref
=
local_assigns
.
fetch
(
:ref
)
{
merge_request
&
.
source_branch
}
-
link
=
commit_path
(
project
,
commit
,
merge_request:
merge_request
)
-
project
=
local_assigns
.
fetch
(
:project
)
{
merge_request
&
.
project
}
-
ref
=
local_assigns
.
fetch
(
:ref
)
{
merge_request
&
.
source_branch
}
-
cache_key
=
[
project
.
full_path
,
commit
.
id
,
current_application_settings
,
@path
.
presence
,
current_controller?
(
:commits
),
merge_request
&
.
iid
,
view_details
,
I18n
.
locale
]
-
cache_key
.
push
(
commit
.
status
(
ref
))
if
commit
.
status
(
ref
)
-
link
=
commit_path
(
project
,
commit
,
merge_request:
merge_request
)
-
cache_key
=
[
project
.
full_path
,
commit
.
id
,
current_application_settings
,
@path
.
presence
,
current_controller?
(
:commits
),
merge_request
&
.
iid
,
view_details
,
commit
.
status
(
ref
),
I18n
.
locale
].
compact
-# EE-only
-
show_project_name
=
local_assigns
.
fetch
(
:show_project_name
,
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