Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-09-10 03:49:53 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2019-09-10 03:49:53 +0300
commitd7c1af988dd5962e9f1a526a31159ed95d03315d (patch)
treeeefc32e9399ba929c9419eed1120fea68b4556bb /lib
parent61c7a085ca73dd291a85f0c5204ebc375270e1d9 (diff)
parent197654fc6a07ab635ea5aed9fe648906953182b8 (diff)
Merge branch 'issue-67127' into 'master'
Expose :protected field for ../tags/:tag_name API endpoint See merge request gitlab-org/gitlab-ce!32790
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index c9b3483acaf..312c8d5b548 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1312,6 +1312,10 @@ 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