Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-06-25 03:07:34 +00:00
parent 1e6730a4e3
commit ddcb65a869
4 changed files with 20 additions and 1 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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