summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMicaël Bergeron <mbergeron@gitlab.com>2018-02-16 13:49:07 -0500
committerMicaël Bergeron <mbergeron@gitlab.com>2018-02-16 13:51:19 -0500
commitaf5cd10e00402937310dfe8e4dfa48b0c15b157a (patch)
tree34a52733ab36f4b631d626bccc090c23e04d5286 /app
parentf9492554617d807b35358cb799d26e3422dd4c71 (diff)
downloadgitlab-ce-af5cd10e00402937310dfe8e4dfa48b0c15b157a.tar.gz
# modified: lib/gitlab/git/commit.rb
Diffstat (limited to 'app')
-rw-r--r--app/workers/process_commit_worker.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/process_commit_worker.rb b/app/workers/process_commit_worker.rb
index a6330a6c51f..5b25d980bdb 100644
--- a/app/workers/process_commit_worker.rb
+++ b/app/workers/process_commit_worker.rb
@@ -25,14 +25,14 @@ class ProcessCommitWorker
commit = build_commit(project, commit_hash)
author = commit.author || user
- # this is a GitLab generated commit message, ignore it.
- return if commit.merged_merge_request?(user)
-
process_commit_message(project, commit, user, author, default)
update_issue_metrics(commit, author)
end
def process_commit_message(project, commit, user, author, default = false)
+ # this is a GitLab generated commit message, ignore it.
+ return if commit.merged_merge_request?(user)
+
closed_issues = default ? commit.closes_issues(user) : []
close_issues(project, user, author, commit, closed_issues) if closed_issues.any?