Commit 7001ad2dda56343dcdf035aebdf3334068d123a0
1 parent
1d497a12
Exists in
spb-stable
and in
3 other branches
Add files encoding support on context level
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
app/contexts/files/create_context.rb
... | ... | @@ -33,7 +33,8 @@ module Files |
33 | 33 | new_file_action = Gitlab::Satellite::NewFileAction.new(current_user, project, ref, file_path) |
34 | 34 | created_successfully = new_file_action.commit!( |
35 | 35 | params[:content], |
36 | - params[:commit_message] | |
36 | + params[:commit_message], | |
37 | + params[:encoding] | |
37 | 38 | ) |
38 | 39 | |
39 | 40 | if created_successfully | ... | ... |
app/contexts/files/update_context.rb
... | ... | @@ -23,10 +23,11 @@ module Files |
23 | 23 | return error("You can only edit text files") |
24 | 24 | end |
25 | 25 | |
26 | - new_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path) | |
27 | - created_successfully = new_file_action.commit!( | |
26 | + edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path) | |
27 | + created_successfully = edit_file_action.commit!( | |
28 | 28 | params[:content], |
29 | - params[:commit_message] | |
29 | + params[:commit_message], | |
30 | + params[:encooding] | |
30 | 31 | ) |
31 | 32 | |
32 | 33 | if created_successfully | ... | ... |