Skip to content

Ensure labels are loaded for all "show" methods of MR Controller

What does this MR do?

Ensures that the @labels variable is populated on any of the "show"-like actions of a Merge Request (e.g. commits, builds, etc). This fixes the bug that causes the Labels UI in the sidebar to disappear when coming to the URL for one of these actions. (See #24397 (closed))

Are there points in the code the reviewer needs to double check?

In MergeRequestsController I called the method labels from IssuableActions to ensure that the @labels variable was populated. It's a private method that is added by the mixin. This is a concise, succinct way to do it, with no code duplication, but I wonder if it's good practice?

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #24397 (closed)

Merge request reports