Commit fad11dec authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Add MR reference to logs

parent 011558ea
...@@ -94,6 +94,11 @@ module MergeRequests ...@@ -94,6 +94,11 @@ module MergeRequests
@merge_request.update(merge_error: log_message) if save_message_on_model @merge_request.update(merge_error: log_message) if save_message_on_model
end end
def log_info(message)
@logger ||= Rails.logger
@logger.info("#{merge_request_info} - #{message}")
end
def merge_request_info def merge_request_info
merge_request.to_reference(full: true) merge_request.to_reference(full: true)
end end
...@@ -101,10 +106,5 @@ module MergeRequests ...@@ -101,10 +106,5 @@ module MergeRequests
def find_merge_source def find_merge_source
merge_request.diff_head_sha merge_request.diff_head_sha
end end
def log_info(message)
@logger ||= Rails.logger
@logger.info(message)
end
end 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