Commit fad11dec authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Add MR reference to logs

parent 011558ea
......@@ -94,6 +94,11 @@ module MergeRequests
@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 @@ module MergeRequests
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