From 852f4a85dd199751e4652748461163de85ecda53 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 20 Feb 2020 03:08:57 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/deploy_tokens.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/api/deploy_tokens.rb (limited to 'lib/api/deploy_tokens.rb') diff --git a/lib/api/deploy_tokens.rb b/lib/api/deploy_tokens.rb new file mode 100644 index 00000000000..bf82c63260d --- /dev/null +++ b/lib/api/deploy_tokens.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module API + class DeployTokens < Grape::API + include PaginationParams + + before { authenticated_as_admin! } + + desc 'Return all deploy tokens' do + detail 'This feature was introduced in GitLab 12.9.' + success Entities::DeployToken + end + params do + use :pagination + end + get 'deploy_tokens' do + present paginate(DeployToken.all), with: Entities::DeployToken + end + end +end -- cgit v1.2.1