Skip to content
Snippets Groups Projects
Commit 5d88de09 authored by Timothy Andrew's avatar Timothy Andrew
Browse files

Refactor `Issue#related_branches`

- Previously, the controller held the logic to calculate
  related branches, which was:

  `<branches ending with `issue.iid`> - <branches with a merge request referenced in the current issue>`

- This logic belongs in the `related_branches` method, not in the
  controller. This commit makes this change.

- This means that `Issue#related_branches` now needs to take a `User`.
  When we find the branches that have a merge request referenced in the
  current issue, this is limited to merge requests that the current user
  has access to.

- This is not directly related to #14566, but is a related refactoring.
parent 377b59da
No related branches found
No related tags found
1 merge request!3671Sanitize branch names for confidential issues
Pipeline #
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment