Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 16:18:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 16:18:24 +0300
commit0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch)
tree4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /lib/gitlab/url_builder.rb
parent744144d28e3e7fddc117924fef88de5d9674fe4c (diff)
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'lib/gitlab/url_builder.rb')
-rw-r--r--lib/gitlab/url_builder.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb
index a242f718b16..c00a0e1bcb4 100644
--- a/lib/gitlab/url_builder.rb
+++ b/lib/gitlab/url_builder.rb
@@ -24,6 +24,8 @@ module Gitlab
instance.project_job_url(object.project, object, **options)
when Commit
commit_url(object, **options)
+ when Compare
+ compare_url(object, **options)
when Group
instance.group_canonical_url(object, **options)
when Issue
@@ -68,6 +70,12 @@ module Gitlab
instance.commit_url(commit, **options)
end
+ def compare_url(compare, **options)
+ return '' unless compare.project
+
+ instance.project_compare_url(compare.project, **options.merge(compare.to_param))
+ end
+
def note_url(note, **options)
if note.for_commit?
return '' unless note.project