module Gitlab::Client::Commits
def create_commit(project, branch, message, actions, options = {})
-
(Gitlab::ObjectifiedHash)
- hash of commit related data
Options Hash:
(**options)
-
:author_name
(String
) -- the name of the author -
:author_email
(String
) -- the email address of the author
Parameters:
-
An
(Array[Hash]
) -- array of action hashes to commit as a batch. See the next table for what attributes it can take. -
message
(String
) -- the commit message -
branch
(String
) -- the branch name you wish to commit to -
project
(Integer, String
) -- The ID or name of a project.
Other tags:
- See: https://docs.gitlab.com/api/commits/#create-a-commit-with-multiple-files-and-actions -
def create_commit(project, branch, message, actions, options = {}) payload = { branch: branch, commit_message: message, actions: actions }.merge(options) post("/projects/#{url_encode project}/repository/commits", body: payload) end