gitlab-org--gitlab-foss/lib/gitlab/git/operation_service.rb

23 lines
537 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module Git
class OperationService
2017-10-10 08:15:21 -04:00
BranchUpdate = Struct.new(:newrev, :repo_created, :branch_created) do
alias_method :repo_created?, :repo_created
alias_method :branch_created?, :branch_created
2017-10-10 08:15:21 -04:00
def self.from_gitaly(branch_update)
return if branch_update.nil?
2017-10-10 08:15:21 -04:00
new(
branch_update.commit_id,
branch_update.repo_created,
branch_update.branch_created
)
end
end
end
end
end