diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-25 06:07:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-25 06:07:34 +0300 |
commit | ddcb65a8697ff806b185da578fff2745b7f1ccc7 (patch) | |
tree | 8d9724d8d7bb9cdec9d8b06332ebeeecd3d7b278 /app | |
parent | 1e6730a4e32f6cbf4b84aa9fc13204778783f33c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/commits_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |