Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-25 06:07:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-25 06:07:34 +0300
commitddcb65a8697ff806b185da578fff2745b7f1ccc7 (patch)
tree8d9724d8d7bb9cdec9d8b06332ebeeecd3d7b278 /app
parent1e6730a4e32f6cbf4b84aa9fc13204778783f33c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/helpers/commits_helper.rb8
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