debian-mirror-gitlab/lib/gitlab/git/operation_service.rb

23 lines
537 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module Gitlab
module Git
class OperationService
BranchUpdate = Struct.new(:newrev, :repo_created, :branch_created) do
alias_method :repo_created?, :repo_created
alias_method :branch_created?, :branch_created
def self.from_gitaly(branch_update)
2018-11-08 19:23:39 +05:30
return if branch_update.nil?
2018-03-17 18:26:18 +05:30
new(
branch_update.commit_id,
branch_update.repo_created,
branch_update.branch_created
)
end
end
end
end
end