Skip to content

Remove duplicates from issue related merge requests

Alexandru Croitor requested to merge duplicate-related-mrs into master

What does this MR do?

Remove duplicates returned by Issues#related_merge_requests API that relies on ReferencedMergeRequestsService which returns 2 arrays one of related MRs and one of related MRs that close the issue(i.e. a subset of first one). We only need related MRs in this case so just pick the first array.

Does this MR meet the acceptance criteria?

https://gitlab.com/gitlab-org/gitlab-ce/issues/57662

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • ~~Label as security and @ mention @gitlab-com/gl-security/appsec~~
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Alexandru Croitor

Merge request reports