diff options
Diffstat (limited to 'app/helpers/commits_helper.rb')
-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 |