diff options
author | mattl <mattl@gitlab.com> | 2016-12-02 12:04:03 -0500 |
---|---|---|
committer | mattl <mattl@gitlab.com> | 2016-12-02 12:04:03 -0500 |
commit | 76d8c2e656da5a7411c2150bf60ad214e0bb0ce1 (patch) | |
tree | c100b48a55871dc5bde4ea8eff623b026f0f33ce /app/helpers | |
parent | 0619fb629dec69f28cb12b6ad896bbb38c841700 (diff) | |
download | gitlab-ce-76d8c2e656da5a7411c2150bf60ad214e0bb0ce1.tar.gz |
WIP: Adds a default commit message when adding a README (#25167)
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 898ce6a3af7..9cda3b78761 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -390,21 +390,7 @@ module ProjectsHelper "success" end end - - def new_readme_path - ref = @repository.root_ref if @repository - ref ||= 'master' - - namespace_project_new_blob_path(@project.namespace, @project, tree_join(ref), file_name: 'README.md') - end - - def new_license_path - ref = @repository.root_ref if @repository - ref ||= 'master' - - namespace_project_new_blob_path(@project.namespace, @project, tree_join(ref), file_name: 'LICENSE') - end - + def readme_cache_key sha = @project.commit.try(:sha) || 'nil' [@project.path_with_namespace, sha, "readme"].join('-') |