diff --git a/LICENSE b/LICENSE index 216125d93c7..690a9a3966b 100644 --- a/LICENSE +++ b/LICENSE @@ -4,6 +4,7 @@ Portions of this software are licensed as follows: * All content residing under the "doc/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license". * All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE". +* All content that resides under the "jh/" directory of this repository, if that directory exists, is licensed under the license defined in "jh/LICENSE". * All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license. * All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component. * Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below. diff --git a/README.md b/README.md index 05193e71c7e..f8eb17cf855 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,11 @@ To see how GitLab looks please see the [features page on our website](https://ab ## Editions -There are two editions of GitLab: +There are three editions of GitLab: - GitLab Community Edition (CE) is available freely under the MIT Expat license. - GitLab Enterprise Edition (EE) includes [extra features](https://about.gitlab.com/pricing/#compare-options) that are more useful for organizations with more than 100 users. To use EE and get official support please [become a subscriber](https://about.gitlab.com/pricing/). +- JiHu Edition (JH) tailored specifically for the [Chinese market](https://about.gitlab.cn/). ## Licensing diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index a7696ba4ea7..d2ac1e8f985 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -167,6 +167,14 @@ module CommitsHelper ] end + DEFAULT_SHA = '0000000' + + # Returns the template path for commit resources + # to be utilized by the client applications. + def commit_path_template(project) + project_commit_path(project, DEFAULT_SHA).sub("/#{DEFAULT_SHA}", '/$COMMIT_SHA') + end + protected # Private: Returns a link to a person. If the person has a matching user and diff --git a/spec/helpers/commits_helper_spec.rb b/spec/helpers/commits_helper_spec.rb index 4e94636ba45..34445d26258 100644 --- a/spec/helpers/commits_helper_spec.rb +++ b/spec/helpers/commits_helper_spec.rb @@ -321,4 +321,13 @@ RSpec.describe CommitsHelper do it { is_expected.to include(pipeline.cache_key) } end end + + describe "#commit_path_template" do + let(:project) { build(:project) } + let(:expected_path) { "/#{project.full_path}/-/commit/$COMMIT_SHA" } + + subject { helper.commit_path_template(project) } + + it { is_expected.to eq(expected_path) } + end end