Commit af5cd10e authored by Micaël Bergeron's avatar Micaël Bergeron

applying feedback

		    #	modified:   lib/gitlab/git/commit.rb
parent f9492554
......@@ -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?
......
......@@ -473,7 +473,8 @@ module Gitlab
def parent_ids=(shas)
@parent_ids = case shas
when String then JSON.parse(shas)
when String
JSON.parse(shas)
else
shas
end
......
......@@ -39,7 +39,7 @@ describe ProcessCommitWorker do
project.repository.commit(sha)
end
it 'does not process the commit' do
it 'it does not close any issues from the commit message' do
expect(worker).not_to receive(:close_issues)
worker.perform(project.id, user.id, commit.to_hash)
......
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