summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects/merge_requests_controller.rb3
-rw-r--r--app/models/merge_request.rb9
-rw-r--r--app/views/projects/commits/_commit.html.haml19
3 files changed, 13 insertions, 18 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 37acd1c9787..e7b3b73024b 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -7,11 +7,8 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
include IssuableCollections
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
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index d60b9fb6b2d..949d42f865c 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -1021,13 +1021,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
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index 8c28becf471..618a6355d23 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -1,11 +1,18 @@
-- 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
= cache(cache_key, expires_in: 1.day) do
%li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" }