Reuse "merge_requests_for_nodes" in "MergeRequestParser"
What does this MR do?
It uses merge_requests_for_nodes
(introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9462) to implement a more specialized version of referenced_by
and nodes_visible_to_user
as suggested in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9462#note_26816709. This should be more performant because it uses the same cache.
Are there points in the code the reviewer needs to double check?
The tests are passing, but it's still worth a closer look.
Does this MR meet the acceptance criteria?
[ ] Changelog entry added, if necessary[ ] Documentation created/updated[ ] API support added- Tests
[ ] Added for this feature/bug-
All builds are passing
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together