diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-07-29 17:33:49 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-07-29 17:33:49 +0300 |
commit | 3fbc0ff9c0c9fa486b753aa23ceac9513a2cde7b (patch) | |
tree | 39dfaf54b50eae11fe177c7bd6a15f45f064bef7 /ruby | |
parent | 4a4ea7c0489b0eb0f7a65c65e5b15c35e3d16f14 (diff) | |
parent | 1a79647c0140fb94387859b8b042cedc312af7da (diff) |
Merge branch 'ps-sort-tags' into 'master'
gitaly: Sort the tags returned by FindAllTags RPC
Closes #3592
See merge request gitlab-org/gitaly!3707
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/proto/gitaly/ref_pb.rb | 11 | ||||
-rw-r--r-- | ruby/proto/gitaly/ref_services_pb.rb | 1 | ||||
-rw-r--r-- | ruby/proto/gitaly/shared_pb.rb | 5 |
3 files changed, 17 insertions, 0 deletions
diff --git a/ruby/proto/gitaly/ref_pb.rb b/ruby/proto/gitaly/ref_pb.rb index 086eaf9a4..4d9bf14f4 100644 --- a/ruby/proto/gitaly/ref_pb.rb +++ b/ruby/proto/gitaly/ref_pb.rb @@ -91,6 +91,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "gitaly.FindAllTagsRequest" do optional :repository, :message, 1, "gitaly.Repository" + optional :sort_by, :message, 2, "gitaly.FindAllTagsRequest.SortBy" + end + add_message "gitaly.FindAllTagsRequest.SortBy" do + optional :key, :enum, 1, "gitaly.FindAllTagsRequest.SortBy.Key" + optional :direction, :enum, 2, "gitaly.SortDirection" + end + add_enum "gitaly.FindAllTagsRequest.SortBy.Key" do + value :REFNAME, 0 + value :CREATORDATE, 1 end add_message "gitaly.FindAllTagsResponse" do repeated :tags, :message, 1, "gitaly.Tag" @@ -219,6 +228,8 @@ module Gitaly FindTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindTagRequest").msgclass FindTagResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindTagResponse").msgclass FindAllTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagsRequest").msgclass + FindAllTagsRequest::SortBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagsRequest.SortBy").msgclass + FindAllTagsRequest::SortBy::Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagsRequest.SortBy.Key").enummodule FindAllTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagsResponse").msgclass RefExistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RefExistsRequest").msgclass RefExistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RefExistsResponse").msgclass diff --git a/ruby/proto/gitaly/ref_services_pb.rb b/ruby/proto/gitaly/ref_services_pb.rb index 81563d116..8d01f5118 100644 --- a/ruby/proto/gitaly/ref_services_pb.rb +++ b/ruby/proto/gitaly/ref_services_pb.rb @@ -22,6 +22,7 @@ module Gitaly # Return a stream so we can divide the response in chunks of branches rpc :FindLocalBranches, ::Gitaly::FindLocalBranchesRequest, stream(::Gitaly::FindLocalBranchesResponse) rpc :FindAllBranches, ::Gitaly::FindAllBranchesRequest, stream(::Gitaly::FindAllBranchesResponse) + # Returns a stream of tags repository has. rpc :FindAllTags, ::Gitaly::FindAllTagsRequest, stream(::Gitaly::FindAllTagsResponse) rpc :FindTag, ::Gitaly::FindTagRequest, ::Gitaly::FindTagResponse rpc :FindAllRemoteBranches, ::Gitaly::FindAllRemoteBranchesRequest, stream(::Gitaly::FindAllRemoteBranchesResponse) diff --git a/ruby/proto/gitaly/shared_pb.rb b/ruby/proto/gitaly/shared_pb.rb index 51e0fbc6c..f96d86356 100644 --- a/ruby/proto/gitaly/shared_pb.rb +++ b/ruby/proto/gitaly/shared_pb.rb @@ -85,6 +85,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :PGP, 1 value :X509, 2 end + add_enum "gitaly.SortDirection" do + value :ASCENDING, 0 + value :DESCENDING, 1 + end end end @@ -103,4 +107,5 @@ module Gitaly GlobalOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GlobalOptions").msgclass ObjectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ObjectType").enummodule SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.SignatureType").enummodule + SortDirection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.SortDirection").enummodule end |