23 lines
468 B
Ruby
23 lines
468 B
Ruby
class Reposync::GetLogsService < Reposync::ClientService
|
|
|
|
attr_accessor :repo_name, :branch_id
|
|
|
|
def initialize(repo_name, branch_id=nil)
|
|
@repo_name = repo_name
|
|
@branch_id = branch_id
|
|
end
|
|
|
|
def call
|
|
result = get(url, request_params)
|
|
response = render_response(result)
|
|
end
|
|
|
|
private
|
|
def request_params
|
|
branch_id.present? ? {branch_id: branch_id}.stringify_keys : {}
|
|
end
|
|
|
|
def url
|
|
"/cerobot/sync/repo/#{repo_name}/logs"
|
|
end
|
|
end |