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
716f9cbb
Commit
716f9cbb
authored
Nov 21, 2017
by
micael.bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidying up the changes
parent
3d8fbd12
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 @
716f9cbb
...
@@ -7,11 +7,8 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
...
@@ -7,11 +7,8 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
include
IssuableCollections
include
IssuableCollections
skip_before_action
:merge_request
,
only:
[
:index
,
:bulk_update
]
skip_before_action
:merge_request
,
only:
[
:index
,
:bulk_update
]
before_action
:authorize_update_issuable!
,
only:
[
:close
,
:edit
,
:update
,
:remove_wip
,
:sort
]
before_action
:authorize_update_issuable!
,
only:
[
:close
,
:edit
,
:update
,
:remove_wip
,
:sort
]
before_action
:set_issuables_index
,
only:
[
:index
]
before_action
:set_issuables_index
,
only:
[
:index
]
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
def
index
def
index
...
...
app/models/merge_request.rb
View file @
716f9cbb
...
@@ -1021,13 +1021,4 @@ class MergeRequest < ActiveRecord::Base
...
@@ -1021,13 +1021,4 @@ class MergeRequest < ActiveRecord::Base
project
.
merge_requests
.
merged
.
where
(
author_id:
author_id
).
empty?
project
.
merge_requests
.
merged
.
where
(
author_id:
author_id
).
empty?
end
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
end
app/views/projects/commits/_commit.html.haml
View file @
716f9cbb
-
view_details
=
local_assigns
.
fetch
(
:view_details
,
false
)
-
view_details
=
local_assigns
.
fetch
(
:view_details
,
false
)
-
merge_request
=
local_assigns
.
fetch
(
:merge_request
,
nil
)
-
merge_request
=
local_assigns
.
fetch
(
:merge_request
,
nil
)
-
project
=
local_assigns
.
fetch
(
:project
)
{
merge_request
&
.
project
}
-
project
=
local_assigns
.
fetch
(
:project
)
{
merge_request
&
.
project
}
-
ref
=
local_assigns
.
fetch
(
:ref
)
{
merge_request
&
.
source_branch
}
-
ref
=
local_assigns
.
fetch
(
:ref
)
{
merge_request
&
.
source_branch
}
-
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
,
I18n
.
locale
]
-
link
=
commit_path
(
project
,
commit
,
merge_request:
merge_request
)
-
cache_key
.
push
(
commit
.
status
(
ref
))
if
commit
.
status
(
ref
)
-
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
=
cache
(
cache_key
,
expires_in:
1
.
day
)
do
=
cache
(
cache_key
,
expires_in:
1
.
day
)
do
%li
.commit.flex-row.js-toggle-container
{
id:
"commit-#{commit.short_id}"
}
%li
.commit.flex-row.js-toggle-container
{
id:
"commit-#{commit.short_id}"
}
...
...
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