Fix broken specs. #3945
This commit is contained in:
parent
f547e733d1
commit
7307fa48e7
|
|
@ -104,7 +104,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
|||
@commit = @merge_request.last_commit
|
||||
@first_commit = @merge_request.first_commit
|
||||
@diffs = @merge_request.compare_diffs
|
||||
@diff_refs = [@merge_request.target_sha, @merge_request.source_sha]
|
||||
# We need to use #source_branch because #source_sha requires an existent MergeRequestDiff object.
|
||||
@diff_refs = [@merge_request.target_sha, @merge_request.source_branch]
|
||||
|
||||
@ci_commit = @merge_request.ci_commit
|
||||
@statuses = @ci_commit.statuses if @ci_commit
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ module Gitlab
|
|||
|
||||
# Only update text if line is found. This will prevent
|
||||
# issues with submodules given the line only exists in diff content.
|
||||
line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if line
|
||||
line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if highlighted_line
|
||||
end
|
||||
|
||||
@lines
|
||||
|
|
|
|||
Loading…
Reference in New Issue