Method: Gitlab::Client::RepositoryFiles#create_file
- Defined in:
- lib/gitlab/client/repository_files.rb
permalink #create_file(project, path, branch, content, commit_message, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a new repository file.
73 74 75 76 77 78 |
# File 'lib/gitlab/client/repository_files.rb', line 73 def create_file(project, path, branch, content, , = {}) post("/projects/#{url_encode project}/repository/files/#{url_encode path}", body: { branch: branch, commit_message: }.merge().merge(encoded_content_attributes(content))) end |