forgeplus/app/services/reposync/update_branch_status_servic...

21 lines
438 B
Ruby

class Reposync::UpdateBranchStatusService < Reposync::ClientService
attr_accessor :repo_name, :branch_name, :enable
def initialize(repo_name, branch_name, enable)
@repo_name = repo_name
@branch_name = branch_name
@enable = enable
end
def call
result = put(url)
response = render_response(result)
end
private
def url
"/cerobot/sync/#{repo_name}/branch/#{branch_name}?enable=#{enable}"
end
end