summaryrefslogtreecommitdiff
path: root/app/controllers/projects/issues_controller.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-10-08 10:40:10 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-10-08 10:40:10 +0100
commitfa875ba7a9441df6827ef1d6b05405c66ee0c579 (patch)
tree23d0cf911c9bf6a73fec9bb1f3de1bf61bedeacd /app/controllers/projects/issues_controller.rb
parentecefe090460687a078e3d1aacf621fd5bff07fb5 (diff)
parent838c1076694d24d180e19625d663749c8b5c1a1c (diff)
downloadgitlab-ce-fa875ba7a9441df6827ef1d6b05405c66ee0c579.tar.gz
Merge branch 'master' into 42611-removed-branch-link
* master: (1252 commits) Render log artifact files in GitLab Check disabled_services when finding a service Fix invalid parent path on group settings page Backport CE changes for: [Frontend only] Batch comments on merge requests Add button to insert table in markdown editor Update GITALY_SERVER_VERSION Updates Laravel.gitlab-ci.yml template Update operations metrics empty state Fix LFS uploaded images not being rendered Prepare admin/projects/show view to allow EE specific feature Add timed incremental rollout to Auto DevOps Update spec comment to point to correct issue Fix documentation for variables Document Security and Licence Management features permissions Fix time dependent jobs spec Use a CTE to remove the query timeout Backport changes from gitlab-ee!7538 Fix CE to EE merge (backport) Add changelog entry Refactor Feature.flipper method ...
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r--app/controllers/projects/issues_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index c3ac8e107fb..b06a6f3bb0d 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Projects::IssuesController < Projects::ApplicationController
include RendersNotes
include ToggleSubscriptionAction
@@ -125,7 +127,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def related_branches
- @related_branches = @issue.related_branches(current_user)
+ @related_branches = Issues::RelatedBranchesService.new(project, current_user).execute(issue)
respond_to do |format|
format.json do
@@ -161,6 +163,7 @@ class Projects::IssuesController < Projects::ApplicationController
protected
+ # rubocop: disable CodeReuse/ActiveRecord
def issue
return @issue if defined?(@issue)
@@ -172,6 +175,7 @@ class Projects::IssuesController < Projects::ApplicationController
@issue
end
+ # rubocop: enable CodeReuse/ActiveRecord
alias_method :subscribable_resource, :issue
alias_method :issuable, :issue
alias_method :awardable, :issue