Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
76d8c2e6
Commit
76d8c2e6
authored
Dec 02, 2016
by
mattl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Adds a default commit message when adding a README (#25167)
parent
0619fb62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
+2
-16
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-15
app/views/projects/_readme.html.haml
app/views/projects/_readme.html.haml
+1
-1
No files found.
app/helpers/projects_helper.rb
View file @
76d8c2e6
...
...
@@ -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
(
'-'
)
...
...
app/views/projects/_readme.html.haml
View file @
76d8c2e6
...
...
@@ -18,5 +18,5 @@
distributed with computer software, forming part of its documentation.
%p
We recommend you to
=
link_to
"add a README"
,
new_readme_path
,
class:
'underlined-link'
=
link_to
"add a README"
,
add_special_file_path
(
@project
,
file_name:
'README.md'
)
,
class:
'underlined-link'
file to the repository and GitLab will render it here instead of this message.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment