diff options
author | Andrew Beresford <aberesford@equalexperts.com> | 2018-04-06 15:58:45 +0100 |
---|---|---|
committer | Andrew Beresford <aberesford@equalexperts.com> | 2018-04-08 20:59:03 +0100 |
commit | 3a4086e22f2a4c837635f14bb6e9ae056299dc6c (patch) | |
tree | c7a72787ce86ca5b0ad419489cd8be67ebfb7bda /lib | |
parent | 86ca1a77c58b508fc1b037c5fffbfb22fd992b42 (diff) | |
download | gitlab-ce-3a4086e22f2a4c837635f14bb6e9ae056299dc6c.tar.gz |
Expose the target commit ID through the tag API
This is useful for annotated tags, where the deferenced target is not the same as the tag object. At the moment there is no way to differentiate the two through the tag API.
This change adds a "target" property and leaves the existing "commit" property alone so that existing behaviour is not altered.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index e35b1a0ff63..8aad320e376 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -928,7 +928,7 @@ module API end class Tag < Grape::Entity - expose :name, :message + expose :name, :message, :target expose :commit, using: Entities::Commit do |repo_tag, options| options[:project].repository.commit(repo_tag.dereferenced_target) |