Commit d7c1af98 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'issue-67127' into 'master'

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

See merge request gitlab-org/gitlab-ce!32790
parents 61c7a085 197654fc
---
title: Expose 'protected' field for Tag API endpoint.
merge_request: 32790
author: Andrea Leone
type: added
......@@ -46,7 +46,8 @@ Parameters:
},
"name": "v1.0.0",
"target": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": null
"message": null,
"protected": true
}
]
```
......@@ -94,7 +95,8 @@ Example Response:
"committer_email": "contact@arthurverschaeve.be",
"committed_date": "2015-02-01T21:56:31.000+01:00"
},
"release": null
"release": null,
"protected": false
}
```
......@@ -138,7 +140,8 @@ Parameters:
},
"name": "v1.0.0",
"target": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": null
"message": null,
"protected": false
}
```
......
......@@ -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
......
......@@ -16,7 +16,8 @@
{ "type": "null" },
{ "$ref": "release/tag_release.json" }
]
}
},
"protected": { "type": "boolean" }
},
"additionalProperties": false
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment