Commit ba0509ed authored by Hiroyuki Sato's avatar Hiroyuki Sato

Make presence_of_commits_in_merge_request private method

parent 9da3ae70
...@@ -346,12 +346,6 @@ module Ci ...@@ -346,12 +346,6 @@ module Ci
end end
end end
def presence_of_commits_in_merge_request
if merge_request&.has_no_commits?
errors.add(:merge_request, "must have commits")
end
end
def git_author_name def git_author_name
strong_memoize(:git_author_name) do strong_memoize(:git_author_name) do
commit.try(:author_name) commit.try(:author_name)
...@@ -757,5 +751,11 @@ module Ci ...@@ -757,5 +751,11 @@ module Ci
project.repository.keep_around(self.sha, self.before_sha) project.repository.keep_around(self.sha, self.before_sha)
end end
def presence_of_commits_in_merge_request
if merge_request&.has_no_commits?
errors.add(:merge_request, "must have commits")
end
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