Refactor reviewers_dropdown_options and assignees_dropdown_options
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=262672) </details> <!--IssueSummary end--> The following discussion from !44097 should be addressed: - [ ] @reprazent started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44097#note_423512931): (+1 comment) > I'm wondering if we should override this entire method in `ee` and use the `super` value to merge in the "multiple_reviewers" options instead. > > I'm thinking something along these lines in EE: > > ```ruby > override :reviewers_dropdown_options > def reviewers_dropdown_options > options = super > > if merge_requests_supports_multiple_reviewers > options.deep_merge!( > title: _('Select reviewer(s)'), > data: { > 'dropdown-header': _('Reviewer(s)') > 'max-select': nil > } > ) > end > > options > end > ``` > > That way we'd only have one method to adjust and we don't need to jump around as much between both files. And we wouldn't have to introduce the empty method in CE. WDYT? > > I haven't tried how the `deep_merge` will affect the `data` hash though :grimacing:. We might have to do the adjustment like you're currently doing it.
issue