diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-12 17:04:18 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-12 17:04:18 +0100 |
commit | ba34045f3120fc52ce714d49778a24c647248500 (patch) | |
tree | 4b5c67306ef29316ef8deeaf03336b20176c277f /lib | |
parent | c119a737935f1e1e8ae7dec814be8accb8980e1d (diff) | |
download | gitlab-ce-ba34045f3120fc52ce714d49778a24c647248500.tar.gz |
Expose release notes to tags api
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 400900bc407..7528e718c6f 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -112,6 +112,12 @@ module API options[:project].repository.commit(repo_obj.target) end end + + expose :release do |repo_obj, options| + if options[:project] + options[:project].releases.find_by(tag: repo_obj.name) + end + end end class RepoObject < Grape::Entity |