summaryrefslogtreecommitdiff
path: root/lib/api/entities/commit.rb
diff options
context:
space:
mode:
authorGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2022-08-30 15:09:23 +0000
committerGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2022-08-30 15:09:23 +0000
commit33d3043f0f3b825f98c7ff2c794208a79bcafdb3 (patch)
tree2fc8f97f12f9e3049ed3daad5700ae438b7eac9b /lib/api/entities/commit.rb
parent99e4792893862d913d0bc9168da7d85775445590 (diff)
parentf1452cd5cf4c3e2dd6697bc25636b49c1aadecd1 (diff)
downloadgitlab-ce-15-1-stable.tar.gz
Merge remote-tracking branch 'dev/15-1-stable' into 15-1-stable15-1-stable
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