22 lines
464 B
Ruby
22 lines
464 B
Ruby
class Reposync::SyncBranchService < Reposync::ClientService
|
|
|
|
attr_accessor :repo_name, :branch_name, :sync_direct
|
|
|
|
def initialize(repo_name, branch_name, sync_direct)
|
|
@repo_name = repo_name
|
|
@branch_name = branch_name
|
|
@sync_direct = sync_direct
|
|
end
|
|
|
|
def call
|
|
result = post(url)
|
|
response = render_response(result)
|
|
end
|
|
|
|
private
|
|
|
|
def url
|
|
"/cerobot/sync/#{repo_name}/branch/#{branch_name}?sync_direct=#{sync_direct}"
|
|
end
|
|
|
|
end |