Skip to content

Show merge errors in merge request widget

Sean McGivern requested to merge 28124-mrs-don-t-show-all-merge-errors into master

There were two problems here:

  1. On the JS side, the reference to $widgetBody didn't refer to the right DOM element any more. This might be because it was replaced by the getMergeStatus method. Even if it wasn't, ensuring we have the right element means that the content gets updated.

  2. On the Ruby side, the log_merge_error method didn't update the merge_error column of the merge request. Change that to update if requested, and update in the most common cases by default.

    Additionally, this would sometimes return an error hash, but it doesn't look like this was ever used (the return value of MergeService#execute appears to be unused everywhere).

Before:

Before

After:

After

Closes #28124 (closed) and https://gitlab.com/gitlab-org/gitlab-ee/issues/1652.

Merge request reports