BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f4b38792
Commit
f4b38792
authored
Jul 01, 2016
by
tiagonbotelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
successfully adds the new version with the updated name on the projects repo
parent
3bda9621
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
creates_commit.rb
app/controllers/concerns/creates_commit.rb
+2
-1
blob_controller.rb
app/controllers/projects/blob_controller.rb
+5
-1
base_service.rb
app/services/files/base_service.rb
+2
-0
No files found.
app/controllers/concerns/creates_commit.rb
View file @
f4b38792
...
...
@@ -7,7 +7,8 @@ module CreatesCommit
commit_params
=
@commit_params
.
merge
(
source_project:
@project
,
source_branch:
@ref
,
target_branch:
@target_branch
target_branch:
@target_branch
,
file_path:
@path
)
result
=
service
.
new
(
@tree_edit_project
,
current_user
,
commit_params
).
execute
...
...
app/controllers/projects/blob_controller.rb
View file @
f4b38792
...
...
@@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController
"#file-path-
#{
hexdigest
(
@path
)
}
"
else
# params[:file_name] stores the new name for the file
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
File
.
join
(
@target_branch
,
params
[
:file_name
]))
unless
params
[
:file_name
]
==
@path
@path
=
params
[
:file_name
]
end
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
File
.
join
(
@target_branch
,
@path
))
end
create_commit
(
Files
::
UpdateService
,
success_path:
after_edit_path
,
...
...
app/services/files/base_service.rb
View file @
f4b38792
...
...
@@ -15,6 +15,8 @@ module Files
params
[
:file_content
]
end
puts
@file_path
# Validate parameters
validate
...
...
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