You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CodeCommit::Types::CreateCommitInput

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb

Overview

Note:

When making an API call, you may pass CreateCommitInput data as a hash:

{
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
  parent_commit_id: "CommitId",
  author_name: "Name",
  email: "Email",
  commit_message: "Message",
  keep_empty_folders: false,
  put_files: [
    {
      file_path: "Path", # required
      file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      file_content: "data",
      source_file: {
        file_path: "Path", # required
        is_move: false,
      },
    },
  ],
  delete_files: [
    {
      file_path: "Path", # required
    },
  ],
  set_file_modes: [
    {
      file_path: "Path", # required
      file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
    },
  ],
}

Instance Attribute Summary collapse

Instance Attribute Details

#author_nameString

The name of the author who created the commit. This information will be used as both the author and committer for the commit.

Returns:

  • (String)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#branch_nameString

The name of the branch where you will create the commit.

Returns:

  • (String)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#commit_messageString

The commit message you want to include as part of creating the commit. Commit messages are limited to 256 KB. If no message is specified, a default message will be used.

Returns:

  • (String)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#delete_filesArray<Types::DeleteFileEntry>

The files to delete in this commit. These files will still exist in prior commits.

Returns:



799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#emailString

The email address of the person who created the commit.

Returns:

  • (String)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#keep_empty_foldersBoolean

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders. The default is false.

Returns:

  • (Boolean)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#parent_commit_idString

The ID of the commit that is the parent of the commit you will create. If this is an empty repository, this is not required.

Returns:

  • (String)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#put_filesArray<Types::PutFileEntry>

The files to add or update in this commit.

Returns:



799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#repository_nameString

The name of the repository where you will create the commit.

Returns:

  • (String)


799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end

#set_file_modesArray<Types::SetFileModeEntry>

The file modes to update for files in this commit.

Returns:



799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/types.rb', line 799

class CreateCommitInput < Struct.new(
  :repository_name,
  :branch_name,
  :parent_commit_id,
  :author_name,
  :email,
  :commit_message,
  :keep_empty_folders,
  :put_files,
  :delete_files,
  :set_file_modes)
  include Aws::Structure
end