Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-03-15 14:34:26 +0300
committerNick Thomas <nick@gitlab.com>2019-03-15 14:34:26 +0300
commita885e2d0a63b25411995fce2057067348f1bad9b (patch)
tree31d93f17243c74dd229c0a76d0a58dc23e99e4ad /spec/support
parent7fa987436bab5fe9a9c3581efa74b23f41bf53c8 (diff)
parent6552197eecfd355041ecb99f48a48efb93c5ffab (diff)
Merge branch 'sh-handle-null-bytes-in-merge-request-diffs' into 'master'
Fix error creating a merge request when diff includes a null byte Closes #57710 See merge request gitlab-org/gitlab-ce!26190
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/repo_helpers.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/support/helpers/repo_helpers.rb b/spec/support/helpers/repo_helpers.rb
index 3c6956cf5e0..4af90f4af79 100644
--- a/spec/support/helpers/repo_helpers.rb
+++ b/spec/support/helpers/repo_helpers.rb
@@ -115,4 +115,18 @@ eos
commits: commits
)
end
+
+ def create_file_in_repo(
+ project, start_branch, branch_name, filename, content,
+ commit_message: 'Add new content')
+ Files::CreateService.new(
+ project,
+ project.owner,
+ commit_message: commit_message,
+ start_branch: start_branch,
+ branch_name: branch_name,
+ file_path: filename,
+ file_content: content
+ ).execute
+ end
end