Creates a commit for a repository on the tip of a specified branch¶
Description¶
Creates a commit for a repository on the tip of a specified branch.
Usage¶
codecommit_create_commit(repositoryName, branchName, parentCommitId,
authorName, email, commitMessage, keepEmptyFolders, putFiles,
deleteFiles, setFileModes)
Arguments¶
-
repositoryName[required] The name of the repository where you create the commit.
-
branchName[required] The name of the branch where you create the commit.
-
parentCommitIdThe ID of the commit that is the parent of the commit you create. Not required if this is an empty repository.
-
authorNameThe name of the author who created the commit. This information is used as both the author and committer for the commit.
-
emailThe email address of the person who created the commit.
-
commitMessageThe commit message you want to include in the commit. Commit messages are limited to 256 KB. If no message is specified, a default message is used.
-
keepEmptyFoldersIf the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a ..gitkeep file is created for empty folders. The default is false.
-
putFilesThe files to add or update in this commit.
-
deleteFilesThe files to delete in this commit. These files still exist in earlier commits.
-
setFileModesThe file modes to update for files in this commit.
Value¶
A list with the following syntax:
list(
commitId = "string",
treeId = "string",
filesAdded = list(
list(
absolutePath = "string",
blobId = "string",
fileMode = "EXECUTABLE"|"NORMAL"|"SYMLINK"
)
),
filesUpdated = list(
list(
absolutePath = "string",
blobId = "string",
fileMode = "EXECUTABLE"|"NORMAL"|"SYMLINK"
)
),
filesDeleted = list(
list(
absolutePath = "string",
blobId = "string",
fileMode = "EXECUTABLE"|"NORMAL"|"SYMLINK"
)
)
)
Request syntax¶
svc$create_commit(
repositoryName = "string",
branchName = "string",
parentCommitId = "string",
authorName = "string",
email = "string",
commitMessage = "string",
keepEmptyFolders = TRUE|FALSE,
putFiles = list(
list(
filePath = "string",
fileMode = "EXECUTABLE"|"NORMAL"|"SYMLINK",
fileContent = raw,
sourceFile = list(
filePath = "string",
isMove = TRUE|FALSE
)
)
),
deleteFiles = list(
list(
filePath = "string"
)
),
setFileModes = list(
list(
filePath = "string",
fileMode = "EXECUTABLE"|"NORMAL"|"SYMLINK"
)
)
)