ruby/proto/gitaly/hook_pb.rb in gitaly-15.11.0.pre.rc1 vs ruby/proto/gitaly/hook_pb.rb in gitaly-16.1.0.pre.rc1

- old
+ new

@@ -1,74 +1,39 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: hook.proto +require 'google/protobuf' + require 'lint_pb' require 'shared_pb' -require 'google/protobuf' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("hook.proto", :syntax => :proto3) do - add_message "gitaly.PreReceiveHookRequest" do - optional :repository, :message, 1, "gitaly.Repository" - repeated :environment_variables, :string, 2 - optional :stdin, :bytes, 4 - repeated :git_push_options, :string, 5 + +descriptor_data = "\n\nhook.proto\x12\x06gitaly\x1a\nlint.proto\x1a\x0cshared.proto\"\x8d\x01\n\x15PreReceiveHookRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x1d\n\x15\x65nvironment_variables\x18\x02 \x03(\t\x12\r\n\x05stdin\x18\x04 \x01(\x0c\x12\x18\n\x10git_push_options\x18\x05 \x03(\t\"a\n\x16PreReceiveHookResponse\x12\x0e\n\x06stdout\x18\x01 \x01(\x0c\x12\x0e\n\x06stderr\x18\x02 \x01(\x0c\x12\'\n\x0b\x65xit_status\x18\x03 \x01(\x0b\x32\x12.gitaly.ExitStatus\"\x8e\x01\n\x16PostReceiveHookRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x1d\n\x15\x65nvironment_variables\x18\x02 \x03(\t\x12\r\n\x05stdin\x18\x03 \x01(\x0c\x12\x18\n\x10git_push_options\x18\x04 \x03(\t\"b\n\x17PostReceiveHookResponse\x12\x0e\n\x06stdout\x18\x01 \x01(\x0c\x12\x0e\n\x06stderr\x18\x02 \x01(\x0c\x12\'\n\x0b\x65xit_status\x18\x03 \x01(\x0b\x32\x12.gitaly.ExitStatus\"\x93\x01\n\x11UpdateHookRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x1d\n\x15\x65nvironment_variables\x18\x02 \x03(\t\x12\x0b\n\x03ref\x18\x03 \x01(\x0c\x12\x11\n\told_value\x18\x04 \x01(\t\x12\x11\n\tnew_value\x18\x05 \x01(\t\"]\n\x12UpdateHookResponse\x12\x0e\n\x06stdout\x18\x01 \x01(\x0c\x12\x0e\n\x06stderr\x18\x02 \x01(\x0c\x12\'\n\x0b\x65xit_status\x18\x03 \x01(\x0b\x32\x12.gitaly.ExitStatus\"\xee\x01\n\x1fReferenceTransactionHookRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x1d\n\x15\x65nvironment_variables\x18\x02 \x03(\t\x12\r\n\x05stdin\x18\x03 \x01(\x0c\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.gitaly.ReferenceTransactionHookRequest.State\"1\n\x05State\x12\x0c\n\x08PREPARED\x10\x00\x12\r\n\tCOMMITTED\x10\x01\x12\x0b\n\x07\x41\x42ORTED\x10\x02\"k\n ReferenceTransactionHookResponse\x12\x0e\n\x06stdout\x18\x01 \x01(\x0c\x12\x0e\n\x06stderr\x18\x02 \x01(\x0c\x12\'\n\x0b\x65xit_status\x18\x03 \x01(\x0b\x32\x12.gitaly.ExitStatus\"\xb0\x01\n%PackObjectsHookWithSidechannelRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x0c\n\x04\x61rgs\x18\x02 \x03(\t\x12\r\n\x05gl_id\x18\x03 \x01(\t\x12\x13\n\x0bgl_username\x18\x05 \x01(\t\x12\x14\n\x0cgit_protocol\x18\x06 \x01(\t\x12\x11\n\tremote_ip\x18\x07 \x01(\t\"(\n&PackObjectsHookWithSidechannelResponse2\x9e\x04\n\x0bHookService\x12[\n\x0ePreReceiveHook\x12\x1d.gitaly.PreReceiveHookRequest\x1a\x1e.gitaly.PreReceiveHookResponse\"\x06\xfa\x97(\x02\x08\x02(\x01\x30\x01\x12^\n\x0fPostReceiveHook\x12\x1e.gitaly.PostReceiveHookRequest\x1a\x1f.gitaly.PostReceiveHookResponse\"\x06\xfa\x97(\x02\x08\x02(\x01\x30\x01\x12M\n\nUpdateHook\x12\x19.gitaly.UpdateHookRequest\x1a\x1a.gitaly.UpdateHookResponse\"\x06\xfa\x97(\x02\x08\x02\x30\x01\x12y\n\x18ReferenceTransactionHook\x12\'.gitaly.ReferenceTransactionHookRequest\x1a(.gitaly.ReferenceTransactionHookResponse\"\x06\xfa\x97(\x02\x08\x02(\x01\x30\x01\x12\x87\x01\n\x1ePackObjectsHookWithSidechannel\x12-.gitaly.PackObjectsHookWithSidechannelRequest\x1a..gitaly.PackObjectsHookWithSidechannelResponse\"\x06\xfa\x97(\x02\x08\x02\x42\x34Z2gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["gitaly.Repository", "shared.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end - add_message "gitaly.PreReceiveHookResponse" do - optional :stdout, :bytes, 1 - optional :stderr, :bytes, 2 - optional :exit_status, :message, 3, "gitaly.ExitStatus" - end - add_message "gitaly.PostReceiveHookRequest" do - optional :repository, :message, 1, "gitaly.Repository" - repeated :environment_variables, :string, 2 - optional :stdin, :bytes, 3 - repeated :git_push_options, :string, 4 - end - add_message "gitaly.PostReceiveHookResponse" do - optional :stdout, :bytes, 1 - optional :stderr, :bytes, 2 - optional :exit_status, :message, 3, "gitaly.ExitStatus" - end - add_message "gitaly.UpdateHookRequest" do - optional :repository, :message, 1, "gitaly.Repository" - repeated :environment_variables, :string, 2 - optional :ref, :bytes, 3 - optional :old_value, :string, 4 - optional :new_value, :string, 5 - end - add_message "gitaly.UpdateHookResponse" do - optional :stdout, :bytes, 1 - optional :stderr, :bytes, 2 - optional :exit_status, :message, 3, "gitaly.ExitStatus" - end - add_message "gitaly.ReferenceTransactionHookRequest" do - optional :repository, :message, 1, "gitaly.Repository" - repeated :environment_variables, :string, 2 - optional :stdin, :bytes, 3 - optional :state, :enum, 4, "gitaly.ReferenceTransactionHookRequest.State" - end - add_enum "gitaly.ReferenceTransactionHookRequest.State" do - value :PREPARED, 0 - value :COMMITTED, 1 - value :ABORTED, 2 - end - add_message "gitaly.ReferenceTransactionHookResponse" do - optional :stdout, :bytes, 1 - optional :stderr, :bytes, 2 - optional :exit_status, :message, 3, "gitaly.ExitStatus" - end - add_message "gitaly.PackObjectsHookWithSidechannelRequest" do - optional :repository, :message, 1, "gitaly.Repository" - repeated :args, :string, 2 - optional :gl_id, :string, 3 - optional :gl_username, :string, 5 - optional :git_protocol, :string, 6 - optional :remote_ip, :string, 7 - end - add_message "gitaly.PackObjectsHookWithSidechannelResponse" do - end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Gitaly PreReceiveHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PreReceiveHookRequest").msgclass PreReceiveHookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PreReceiveHookResponse").msgclass