Коммит ddcb65a8 создал по автору GitLab Bot's avatar GitLab Bot
Просмотр файлов

Add latest changes from gitlab-org/gitlab@master

владелец 1e6730a4
......@@ -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.
......
......@@ -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
......
......@@ -167,6 +167,14 @@ def commit_partial_cache_key(commit, ref:, merge_request:, request:)
]
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
......
......@@ -321,4 +321,13 @@ def standard_expected_data
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
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать