Commit ae4bc9de authored by Robert Speicher's avatar Robert Speicher

Merge branch 'tc-link-to-commit-on-help-page-ee' into 'master'

Make the revision on the `/help` page clickable

See merge request !2089
parents ec7b1e67 6493aacd
......@@ -4,7 +4,7 @@
Enterprise Edition
- if user_signed_in?
%span= Gitlab::VERSION
%small= Gitlab::REVISION
%small= link_to Gitlab::REVISION, Gitlab::COM_URL + namespace_project_commits_path('gitlab-org', 'gitlab-ee', Gitlab::REVISION)
- if current_application_settings.version_check_enabled
= version_status_badge
%br
......
---
title: Make the revision on the `/help` page clickable
merge_request: 12016
author:
......@@ -2,10 +2,11 @@ require_dependency 'gitlab/git'
module Gitlab
SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}
COM_URL = 'https://gitlab.com'.freeze
def self.com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
Gitlab.config.gitlab.url == 'https://gitlab.com' || gl_subdomain?
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
end
def self.gl_subdomain?
......
......@@ -21,7 +21,7 @@ describe 'help/index' do
render
expect(rendered).to match '8.0.2'
expect(rendered).to match 'abcdefg'
expect(rendered).to have_link('abcdefg', 'https://gitlab.com/gitlab-org/gitlab-ee/commits/abcdefg')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment