Skip to content
GitmoapAPIBeta
Schema

CreateCommitRequest

One commit, written from a list of file changes: the branch it lands on, its message, and each file to create, update, delete, move or make executable.

Shape

  • actionsarray of FileActionThe file changes, at most 100, each path touched once.
  • branchBranchName (string)The branch the commit lands on.
  • messageCommitMessage (string)The commit message, taken as written — trailers such as Signed-off-by included.
  • expected_head_shaCommitHash (string) or nulloptionalThe head the commit must land on. Omitted, the commit lands on the branch's current head as long as every file it changes is still the one the caller edited.
  • start_branchBranchName (string) or nulloptionalCreate branch from this branch's head and land the commit on it, in one step. branch must not exist yet.

Example

Synthesized example
{
"actions": [
{
"action": "create",
"content": "content-952c",
"path": "path-e34b"
}
],
"branch": "feat/run-header-stream",
"message": "Draw the region map from operation density",
"expected_head_sha": "509060fb68d8a93c83213dca11df1b2064b332a3",
"start_branch": "feat/run-header-stream"
}

Graph

Used inside

No schema contains this one.

Contains

Used by

Returned by 0 operations

No operation returns it directly.