summaryrefslogtreecommitdiff
path: root/lib/api/entities/commit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/commit.rb')
-rw-r--r--lib/api/entities/commit.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/entities/commit.rb b/lib/api/entities/commit.rb
index fd23c23b980..6cd180cd584 100644
--- a/lib/api/entities/commit.rb
+++ b/lib/api/entities/commit.rb
@@ -12,7 +12,9 @@ module API
expose :trailers
expose :web_url do |commit, _options|
- Gitlab::UrlBuilder.build(commit)
+ c = commit
+ c = c.__subject__ if c.is_a?(Gitlab::View::Presenter::Base)
+ Gitlab::UrlBuilder.build(c)
end
end
end