Expose :protected field for ../tags/:tag_name API endpoint

This commit is contained in:
Andrea Leone 2019-09-07 10:18:31 +02:00
parent 00bcd3584a
commit b807b42aa3
No known key found for this signature in database
GPG Key ID: 7391D710007AE6C0
1 changed files with 5 additions and 0 deletions

View File

@ -1263,6 +1263,11 @@ module API
options[:project].releases.find_by(tag: repo_tag.name)
end
# rubocop: enable CodeReuse/ActiveRecord
expose :protected do |repo_tag, options|
::ProtectedTag.protected?(options[:project], repo_tag.name)
end
end
class Runner < Grape::Entity