diff options
Diffstat (limited to 'lib/api/releases.rb')
-rw-r--r-- | lib/api/releases.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/api/releases.rb b/lib/api/releases.rb index 37d06988e64..63c755f3620 100644 --- a/lib/api/releases.rb +++ b/lib/api/releases.rb @@ -49,6 +49,10 @@ module API requires :name, type: String, desc: 'The name of the release' requires :description, type: String, desc: 'The release notes' optional :ref, type: String, desc: 'The commit sha or branch name' + optional :links_attributes, type: Array do + requires :name, type: String + requires :url, type: String + end end post ':id/releases' do authorize_create_release! @@ -72,6 +76,13 @@ module API requires :tag_name, type: String, desc: 'The name of the tag', as: :tag optional :name, type: String, desc: 'The name of the release' optional :description, type: String, desc: 'Release notes with markdown support' + optional :links_attributes, type: Array do + optional :id, type: Integer + optional :name, type: String + optional :url, type: String + optional :_destroy, type: Integer + at_least_one_of :name, :url, :_destroy + end end put ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do authorize_update_release! |