diff options
author | Sean Edge <asedge@gmail.com> | 2014-09-24 22:30:06 -0400 |
---|---|---|
committer | Sean Edge <asedge@gmail.com> | 2014-10-30 09:48:23 -0400 |
commit | 822d9aa6ba150ed1983dda3cfddaaa177f6b9f97 (patch) | |
tree | c476c8170a97f3d65ce89a268773a2289d2152e7 /lib/api/entities.rb | |
parent | f99b876837e8e86dc5f4d898c16046d3183804a8 (diff) | |
download | gitlab-ce-822d9aa6ba150ed1983dda3cfddaaa177f6b9f97.tar.gz |
Create RepoTag Grape entity and present it when doing stuff with tags via API. Update API doc for repositories. Add tag message to tag list page in UI. Update Changelog. Update spec to set .gitconfig identity, required for annotated tags.
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 80e9470195e..d19caf5b23a 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -73,6 +73,25 @@ module API end end + class RepoTag < Grape::Entity + expose :name + expose :message do |repo_obj, _options| + if repo_obj.respond_to?(:message) + repo_obj.message + else + nil + end + end + + expose :commit do |repo_obj, options| + if repo_obj.respond_to?(:commit) + repo_obj.commit + elsif options[:project] + options[:project].repository.commit(repo_obj.target) + end + end + end + class RepoObject < Grape::Entity expose :name |