Read about our upcoming Code of Conduct on this issue

Commit 73f5b02b authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Change the force flag to a keyword argument

parent 4b779c77aa84
......@@ -1073,7 +1073,7 @@ def origin_merge_requests
merge_requests.where(source_project_id: self.id)
end
def create_repository(force = false)
def create_repository(force: false)
# Forked import is handled asynchronously
return if forked? && !force
......@@ -1087,7 +1087,7 @@ def create_repository(force = false)
end
def ensure_repository
create_repository(true) unless repository_exists?
create_repository(force: true) unless repository_exists?
end
def repository_exists?
......
......@@ -1344,7 +1344,7 @@ def create_pipeline
.with(project.repository_storage_path, project.path_with_namespace)
.and_return(true)
expect(project).to receive(:create_repository)
expect(project).to receive(:create_repository).with(force: true)
project.ensure_repository
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