Remove duplicate calls of MergeRequest#can_be_reverted? on MR widget endpoint
What does this MR do?
According to http://profiler.gitlap.com/20180123/d988e1eb-0370-4a25-9a4e-6d36112a403a.html.gz, we can see Commit#has_been_reverted?
is called twice in MergeRequestsController#show.json
. That happens because MergeRequest#can_be_reverted?
is also called twice on MergeRequestsPresenter
.
Reported via https://gitlab.com/gitlab-org/gitlab-ce/issues/36876#note_55858440
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Oswaldo Ferreira