Merge branch 'tc-link-to-commit-on-help-page' into 'master'
Make the revision on the `/help` page clickable See merge request !12016
This commit is contained in:
commit
3d963515be
4 changed files with 9 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
Community Edition
|
Community Edition
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
%span= Gitlab::VERSION
|
%span= Gitlab::VERSION
|
||||||
%small= Gitlab::REVISION
|
%small= link_to Gitlab::REVISION, Gitlab::COM_URL + namespace_project_commits_path('gitlab-org', 'gitlab-ce', Gitlab::REVISION)
|
||||||
= version_status_badge
|
= version_status_badge
|
||||||
%p.slead
|
%p.slead
|
||||||
GitLab is open source software to collaborate on code.
|
GitLab is open source software to collaborate on code.
|
||||||
|
|
4
changelogs/unreleased/tc-link-to-commit-on-help-page.yml
Normal file
4
changelogs/unreleased/tc-link-to-commit-on-help-page.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Make the revision on the `/help` page clickable
|
||||||
|
merge_request: 12016
|
||||||
|
author:
|
|
@ -1,9 +1,11 @@
|
||||||
require_dependency 'gitlab/git'
|
require_dependency 'gitlab/git'
|
||||||
|
|
||||||
module Gitlab
|
module Gitlab
|
||||||
|
COM_URL = 'https://gitlab.com'.freeze
|
||||||
|
|
||||||
def self.com?
|
def self.com?
|
||||||
# Check `staging?` as well to keep parity with gitlab.com
|
# Check `staging?` as well to keep parity with gitlab.com
|
||||||
Gitlab.config.gitlab.url == 'https://gitlab.com' || staging?
|
Gitlab.config.gitlab.url == COM_URL || staging?
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.staging?
|
def self.staging?
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe 'help/index' do
|
||||||
render
|
render
|
||||||
|
|
||||||
expect(rendered).to match '8.0.2'
|
expect(rendered).to match '8.0.2'
|
||||||
expect(rendered).to match 'abcdefg'
|
expect(rendered).to have_link('abcdefg', 'https://gitlab.com/gitlab-org/gitlab-ce/commits/abcdefg')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue