fast automerge: done
This commit is contained in:
parent
dcbb875c46
commit
e5f8397fd4
5 changed files with 52 additions and 21 deletions
|
@ -37,21 +37,8 @@ module Project::RepositoryTrait
|
|||
end
|
||||
end
|
||||
|
||||
def path_to_repo_satellite
|
||||
File.join(Rails.root, "tmp", "repo_satellites", self.path)
|
||||
end
|
||||
|
||||
def satellite_exists?
|
||||
File.exist? path_to_repo_satellite
|
||||
end
|
||||
|
||||
def create_repo_satellite
|
||||
`git clone #{url_to_repo} #{path_to_repo_satellite}`
|
||||
Dir.chdir(path_to_repo_satellite) do
|
||||
primary_branch = Grit::Repo.new(".").heads.first.name #usually it`s master
|
||||
`git checkout -b __parking_branch`
|
||||
`git branch -D #{primary_branch}`
|
||||
end
|
||||
def satellite
|
||||
@satellite ||= Gitlabhq::Satellite.new(self)
|
||||
end
|
||||
|
||||
def write_hook(name, content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue