diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-16 21:10:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-16 21:10:51 +0300 |
commit | e684f438e60b801b4eb8b19dd9489dce84503c03 (patch) | |
tree | 115e9d137f570580b17825ed13057d663a0761c0 /app/presenters/merge_request_presenter.rb | |
parent | d872c89ce4828a16d72ddeed8695077fdcaf7b30 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/merge_request_presenter.rb')
-rw-r--r-- | app/presenters/merge_request_presenter.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb index 6bf5e0bd1b0..fc8a290f5f7 100644 --- a/app/presenters/merge_request_presenter.rb +++ b/app/presenters/merge_request_presenter.rb @@ -139,7 +139,6 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated end def mentioned_issues_links - mentioned_issues = issues_mentioned_but_not_closing(current_user) markdown( issues_sentence(project, mentioned_issues), pipeline: :gfm, @@ -239,6 +238,18 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated APPROVALS_WIDGET_BASE_TYPE end + def closing_issues + strong_memoize(:closing_issues) do + visible_closing_issues_for(current_user) + end + end + + def mentioned_issues + strong_memoize(:mentioned_issues) do + issues_mentioned_but_not_closing(current_user) + end + end + private def cached_can_be_reverted? @@ -253,10 +264,6 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated # rubocop: enable CodeReuse/ServiceClass end - def closing_issues - @closing_issues ||= visible_closing_issues_for(current_user) - end - def pipeline @pipeline ||= actual_head_pipeline end |