diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-06-28 09:49:53 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-06-28 09:49:53 +0300 |
commit | 941756c59f2c193e06af9060943187eff8e84dfa (patch) | |
tree | bfd468c10843b71b74de113a6647cc7aab7b97ab /app | |
parent | dbbd8d0503b17216ed3732cad6339d2829603587 (diff) | |
parent | 1860ef7dd4675cda33577bf830423697b94cc8fb (diff) |
Merge branch 'add-more-rebase-logging' into 'master'
Add extra logging to githost.log when rebasing
See merge request gitlab-org/gitlab-ce!20202
Diffstat (limited to 'app')
-rw-r--r-- | app/services/merge_requests/rebase_service.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/merge_requests/rebase_service.rb b/app/services/merge_requests/rebase_service.rb index c0083cd6afd..5b4bc86b9ba 100644 --- a/app/services/merge_requests/rebase_service.rb +++ b/app/services/merge_requests/rebase_service.rb @@ -18,10 +18,18 @@ module MergeRequests return false end + log_prefix = "#{self.class.name} info (#{merge_request.to_reference(full: true)}):" + + Gitlab::GitLogger.info("#{log_prefix} rebase started") + rebase_sha = repository.rebase(current_user, merge_request) + Gitlab::GitLogger.info("#{log_prefix} rebased to #{rebase_sha}") + merge_request.update_attributes(rebase_commit_sha: rebase_sha) + Gitlab::GitLogger.info("#{log_prefix} rebase SHA saved: #{rebase_sha}") + true rescue => e log_error(REBASE_ERROR, save_message_on_model: true) |