summaryrefslogtreecommitdiff
path: root/lib/api/deploy_tokens.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 18:08:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 18:08:03 +0000
commitdc003cd08b4cb72fecbb03aa978ea0c53c03aeb4 (patch)
tree5e77ce228c33619201ac6706b9789d4a2eed2a3b /lib/api/deploy_tokens.rb
parente80e0dd64fbb04f60394cb1bb08e17dbcb22b8ce (diff)
downloadgitlab-ce-dc003cd08b4cb72fecbb03aa978ea0c53c03aeb4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/deploy_tokens.rb')
-rw-r--r--lib/api/deploy_tokens.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/deploy_tokens.rb b/lib/api/deploy_tokens.rb
index 2b1c485785b..a637bfcb180 100644
--- a/lib/api/deploy_tokens.rb
+++ b/lib/api/deploy_tokens.rb
@@ -53,10 +53,10 @@ module API
params do
requires :name, type: String, desc: "New deploy token's name"
- requires :expires_at, type: DateTime, desc: 'Expiration date for the deploy token. Does not expire if no value is provided.'
- requires :username, type: String, desc: 'Username for deploy token. Default is `gitlab+deploy-token-{n}`'
requires :scopes, type: Array[String], values: ::DeployToken::AVAILABLE_SCOPES.map(&:to_s),
desc: 'Indicates the deploy token scopes. Must be at least one of "read_repository" or "read_registry".'
+ optional :expires_at, type: DateTime, desc: 'Expiration date for the deploy token. Does not expire if no value is provided.'
+ optional :username, type: String, desc: 'Username for deploy token. Default is `gitlab+deploy-token-{n}`'
end
desc 'Create a project deploy token' do
detail 'This feature was introduced in GitLab 12.9'
@@ -114,10 +114,10 @@ module API
params do
requires :name, type: String, desc: 'The name of the deploy token'
- requires :expires_at, type: DateTime, desc: 'Expiration date for the deploy token. Does not expire if no value is provided.'
- requires :username, type: String, desc: 'Username for deploy token. Default is `gitlab+deploy-token-{n}`'
requires :scopes, type: Array[String], values: ::DeployToken::AVAILABLE_SCOPES.map(&:to_s),
desc: 'Indicates the deploy token scopes. Must be at least one of "read_repository" or "read_registry".'
+ optional :expires_at, type: DateTime, desc: 'Expiration date for the deploy token. Does not expire if no value is provided.'
+ optional :username, type: String, desc: 'Username for deploy token. Default is `gitlab+deploy-token-{n}`'
end
desc 'Create a group deploy token' do
detail 'This feature was introduced in GitLab 12.9'