Read about our upcoming Code of Conduct on this issue

Commit fad11dec authored by Oswaldo Ferreira's avatar Oswaldo Ferreira
Browse files

Add MR reference to logs

parent 76155df4df21
......@@ -94,6 +94,11 @@ def handle_merge_error(log_message:, save_message_on_model: false)
@merge_request.update(merge_error: log_message) if save_message_on_model
end
def log_info(message)
@logger ||= Rails.logger
@logger.info("#{merge_request_info} - #{message}")
end
def merge_request_info
merge_request.to_reference(full: true)
end
......@@ -101,10 +106,5 @@ def merge_request_info
def find_merge_source
merge_request.diff_head_sha
end
def log_info(message)
@logger ||= Rails.logger
@logger.info(message)
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment