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

Class: Aws::CodeCommit::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#batch_get_repositories(params = {}) ⇒ Types::BatchGetRepositoriesOutput

Returns information about one or more repositories.

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Examples:

Request syntax with placeholder values


resp = client.batch_get_repositories({
  repository_names: ["RepositoryName"], # required
})

Response structure


resp.repositories #=> Array
resp.repositories[0]. #=> String
resp.repositories[0].repository_id #=> String
resp.repositories[0].repository_name #=> String
resp.repositories[0].repository_description #=> String
resp.repositories[0].default_branch #=> String
resp.repositories[0].last_modified_date #=> Time
resp.repositories[0].creation_date #=> Time
resp.repositories[0].clone_url_http #=> String
resp.repositories[0].clone_url_ssh #=> String
resp.repositories[0].arn #=> String
resp.repositories_not_found #=> Array
resp.repositories_not_found[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_names (required, Array<String>)

    The names of the repositories to get information about.

Returns:

See Also:



203
204
205
206
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 203

def batch_get_repositories(params = {}, options = {})
  req = build_request(:batch_get_repositories, params)
  req.send_request(options)
end

#create_branch(params = {}) ⇒ Struct

Creates a new branch in a repository and points the branch to a commit.

Calling the create branch operation does not set a repository's default branch. To do this, call the update default branch operation.

Examples:

Request syntax with placeholder values


resp = client.create_branch({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
  commit_id: "CommitId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository in which you want to create the new branch.

  • :branch_name (required, String)

    The name of the new branch to create.

  • :commit_id (required, String)

    The ID of the commit to point the new branch to.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



239
240
241
242
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 239

def create_branch(params = {}, options = {})
  req = build_request(:create_branch, params)
  req.send_request(options)
end

#create_pull_request(params = {}) ⇒ Types::CreatePullRequestOutput

Creates a pull request in the specified repository.

Examples:

Request syntax with placeholder values


resp = client.create_pull_request({
  title: "Title", # required
  description: "Description",
  targets: [ # required
    {
      repository_name: "RepositoryName", # required
      source_reference: "ReferenceName", # required
      destination_reference: "ReferenceName",
    },
  ],
  client_request_token: "ClientRequestToken",
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :title (required, String)

    The title of the pull request. This title will be used to identify the pull request to other users in the repository.

  • :description (String)

    A description of the pull request.

  • :targets (required, Array<Types::Target>)

    The targets for the pull request, including the source of the code to be reviewed (the source branch), and the destination where the creator of the pull request intends the code to be merged after the pull request is closed (the destination branch).

  • :client_request_token (String)

    A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

    The AWS SDKs prepopulate client request tokens. If using an AWS SDK, you do not have to generate an idempotency token, as this will be done for you.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



317
318
319
320
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 317

def create_pull_request(params = {}, options = {})
  req = build_request(:create_pull_request, params)
  req.send_request(options)
end

#create_repository(params = {}) ⇒ Types::CreateRepositoryOutput

Creates a new, empty repository.

Examples:

Request syntax with placeholder values


resp = client.create_repository({
  repository_name: "RepositoryName", # required
  repository_description: "RepositoryDescription",
})

Response structure


resp.. #=> String
resp..repository_id #=> String
resp..repository_name #=> String
resp..repository_description #=> String
resp..default_branch #=> String
resp..last_modified_date #=> Time
resp..creation_date #=> Time
resp..clone_url_http #=> String
resp..clone_url_ssh #=> String
resp..arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the new repository to be created.

    The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.

  • :repository_description (String)

    A comment or description about the new repository.

    The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Returns:

See Also:



379
380
381
382
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 379

def create_repository(params = {}, options = {})
  req = build_request(:create_repository, params)
  req.send_request(options)
end

#delete_branch(params = {}) ⇒ Types::DeleteBranchOutput

Deletes a branch from a repository, unless that branch is the default branch for the repository.

Examples:

Request syntax with placeholder values


resp = client.delete_branch({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
})

Response structure


resp.deleted_branch.branch_name #=> String
resp.deleted_branch.commit_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the branch to be deleted.

  • :branch_name (required, String)

    The name of the branch to delete.

Returns:

See Also:



413
414
415
416
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 413

def delete_branch(params = {}, options = {})
  req = build_request(:delete_branch, params)
  req.send_request(options)
end

#delete_comment_content(params = {}) ⇒ Types::DeleteCommentContentOutput

Deletes the content of a comment made on a change, file, or commit in a repository.

Examples:

Request syntax with placeholder values


resp = client.delete_comment_content({
  comment_id: "CommentId", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

Returns:

See Also:



450
451
452
453
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 450

def delete_comment_content(params = {}, options = {})
  req = build_request(:delete_comment_content, params)
  req.send_request(options)
end

#delete_repository(params = {}) ⇒ Types::DeleteRepositoryOutput

Deletes a repository. If a specified repository was already deleted, a null repository ID will be returned.

Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository will fail.

Examples:

Request syntax with placeholder values


resp = client.delete_repository({
  repository_name: "RepositoryName", # required
})

Response structure


resp.repository_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to delete.

Returns:

See Also:



483
484
485
486
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 483

def delete_repository(params = {}, options = {})
  req = build_request(:delete_repository, params)
  req.send_request(options)
end

#describe_pull_request_events(params = {}) ⇒ Types::DescribePullRequestEventsOutput

Returns information about one or more pull request events.

Examples:

Request syntax with placeholder values


resp = client.describe_pull_request_events({
  pull_request_id: "PullRequestId", # required
  pull_request_event_type: "PULL_REQUEST_CREATED", # accepts PULL_REQUEST_CREATED, PULL_REQUEST_STATUS_CHANGED, PULL_REQUEST_SOURCE_REFERENCE_UPDATED, PULL_REQUEST_MERGE_STATE_CHANGED
  actor_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.pull_request_events #=> Array
resp.pull_request_events[0].pull_request_id #=> String
resp.pull_request_events[0].event_date #=> Time
resp.pull_request_events[0].pull_request_event_type #=> String, one of "PULL_REQUEST_CREATED", "PULL_REQUEST_STATUS_CHANGED", "PULL_REQUEST_SOURCE_REFERENCE_UPDATED", "PULL_REQUEST_MERGE_STATE_CHANGED"
resp.pull_request_events[0].actor_arn #=> String
resp.pull_request_events[0]..pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request_events[0]..repository_name #=> String
resp.pull_request_events[0]..before_commit_id #=> String
resp.pull_request_events[0]..after_commit_id #=> String
resp.pull_request_events[0]..repository_name #=> String
resp.pull_request_events[0]..destination_reference #=> String
resp.pull_request_events[0]...is_merged #=> Boolean
resp.pull_request_events[0]...merged_by #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :pull_request_event_type (String)

    Optional. The pull request event type about which you want to return information.

  • :actor_arn (String)

    The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with additional commits or changing the status of a pull request.

  • :next_token (String)

    An enumeration token that when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-negative integer used to limit the number of returned results. The default is 100 events, which is also the maximum number of events that can be returned in a result.

Returns:

See Also:



548
549
550
551
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 548

def describe_pull_request_events(params = {}, options = {})
  req = build_request(:describe_pull_request_events, params)
  req.send_request(options)
end

#get_blob(params = {}) ⇒ Types::GetBlobOutput

Returns the base-64 encoded content of an individual blob within a repository.

Examples:

Request syntax with placeholder values


resp = client.get_blob({
  repository_name: "RepositoryName", # required
  blob_id: "ObjectId", # required
})

Response structure


resp.content #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the blob.

  • :blob_id (required, String)

    The ID of the blob, which is its SHA-1 pointer.

Returns:

See Also:



581
582
583
584
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 581

def get_blob(params = {}, options = {})
  req = build_request(:get_blob, params)
  req.send_request(options)
end

#get_branch(params = {}) ⇒ Types::GetBranchOutput

Returns information about a repository branch, including its name and the last commit ID.

Examples:

Request syntax with placeholder values


resp = client.get_branch({
  repository_name: "RepositoryName",
  branch_name: "BranchName",
})

Response structure


resp.branch.branch_name #=> String
resp.branch.commit_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (String)

    The name of the repository that contains the branch for which you want to retrieve information.

  • :branch_name (String)

    The name of the branch for which you want to retrieve information.

Returns:

See Also:



616
617
618
619
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 616

def get_branch(params = {}, options = {})
  req = build_request(:get_branch, params)
  req.send_request(options)
end

#get_comment(params = {}) ⇒ Types::GetCommentOutput

Returns the content of a comment made on a change, file, or commit in a repository.

Examples:

Request syntax with placeholder values


resp = client.get_comment({
  comment_id: "CommentId", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

Returns:

See Also:



653
654
655
656
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 653

def get_comment(params = {}, options = {})
  req = build_request(:get_comment, params)
  req.send_request(options)
end

#get_comments_for_compared_commit(params = {}) ⇒ Types::GetCommentsForComparedCommitOutput

Returns information about comments made on the comparison between two commits.

Examples:

Request syntax with placeholder values


resp = client.get_comments_for_compared_commit({
  repository_name: "RepositoryName", # required
  before_commit_id: "CommitId",
  after_commit_id: "CommitId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.comments_for_compared_commit_data #=> Array
resp.comments_for_compared_commit_data[0].repository_name #=> String
resp.comments_for_compared_commit_data[0].before_commit_id #=> String
resp.comments_for_compared_commit_data[0].after_commit_id #=> String
resp.comments_for_compared_commit_data[0].before_blob_id #=> String
resp.comments_for_compared_commit_data[0].after_blob_id #=> String
resp.comments_for_compared_commit_data[0].location.file_path #=> String
resp.comments_for_compared_commit_data[0].location.file_position #=> Integer
resp.comments_for_compared_commit_data[0].location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comments_for_compared_commit_data[0].comments #=> Array
resp.comments_for_compared_commit_data[0].comments[0].comment_id #=> String
resp.comments_for_compared_commit_data[0].comments[0].content #=> String
resp.comments_for_compared_commit_data[0].comments[0].in_reply_to #=> String
resp.comments_for_compared_commit_data[0].comments[0].creation_date #=> Time
resp.comments_for_compared_commit_data[0].comments[0].last_modified_date #=> Time
resp.comments_for_compared_commit_data[0].comments[0].author_arn #=> String
resp.comments_for_compared_commit_data[0].comments[0].deleted #=> Boolean
resp.comments_for_compared_commit_data[0].comments[0].client_request_token #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to compare commits.

  • :before_commit_id (String)

    To establish the directionality of the comparison, the full commit ID of the 'before' commit.

  • :after_commit_id (required, String)

    To establish the directionality of the comparison, the full commit ID of the 'after' commit.

  • :next_token (String)

    An enumeration token that when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-negative integer used to limit the number of returned results. The default is 100 comments, and is configurable up to 500.

Returns:

See Also:



721
722
723
724
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 721

def get_comments_for_compared_commit(params = {}, options = {})
  req = build_request(:get_comments_for_compared_commit, params)
  req.send_request(options)
end

#get_comments_for_pull_request(params = {}) ⇒ Types::GetCommentsForPullRequestOutput

Returns comments made on a pull request.

Examples:

Request syntax with placeholder values


resp = client.get_comments_for_pull_request({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName",
  before_commit_id: "CommitId",
  after_commit_id: "CommitId",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.comments_for_pull_request_data #=> Array
resp.comments_for_pull_request_data[0].pull_request_id #=> String
resp.comments_for_pull_request_data[0].repository_name #=> String
resp.comments_for_pull_request_data[0].before_commit_id #=> String
resp.comments_for_pull_request_data[0].after_commit_id #=> String
resp.comments_for_pull_request_data[0].before_blob_id #=> String
resp.comments_for_pull_request_data[0].after_blob_id #=> String
resp.comments_for_pull_request_data[0].location.file_path #=> String
resp.comments_for_pull_request_data[0].location.file_position #=> Integer
resp.comments_for_pull_request_data[0].location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comments_for_pull_request_data[0].comments #=> Array
resp.comments_for_pull_request_data[0].comments[0].comment_id #=> String
resp.comments_for_pull_request_data[0].comments[0].content #=> String
resp.comments_for_pull_request_data[0].comments[0].in_reply_to #=> String
resp.comments_for_pull_request_data[0].comments[0].creation_date #=> Time
resp.comments_for_pull_request_data[0].comments[0].last_modified_date #=> Time
resp.comments_for_pull_request_data[0].comments[0].author_arn #=> String
resp.comments_for_pull_request_data[0].comments[0].deleted #=> Boolean
resp.comments_for_pull_request_data[0].comments[0].client_request_token #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (String)

    The name of the repository that contains the pull request.

  • :before_commit_id (String)

    The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.

  • :after_commit_id (String)

    The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made.

  • :next_token (String)

    An enumeration token that when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.

Returns:

See Also:



795
796
797
798
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 795

def get_comments_for_pull_request(params = {}, options = {})
  req = build_request(:get_comments_for_pull_request, params)
  req.send_request(options)
end

#get_commit(params = {}) ⇒ Types::GetCommitOutput

Returns information about a commit, including commit message and committer information.

Examples:

Request syntax with placeholder values


resp = client.get_commit({
  repository_name: "RepositoryName", # required
  commit_id: "ObjectId", # required
})

Response structure


resp.commit.commit_id #=> String
resp.commit.tree_id #=> String
resp.commit.parents #=> Array
resp.commit.parents[0] #=> String
resp.commit.message #=> String
resp.commit.author.name #=> String
resp.commit.author.email #=> String
resp.commit.author.date #=> String
resp.commit.committer.name #=> String
resp.commit.committer.email #=> String
resp.commit.committer.date #=> String
resp.commit.additional_data #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to which the commit was made.

  • :commit_id (required, String)

    The commit ID. Commit IDs are the full SHA of the commit.

Returns:

See Also:



839
840
841
842
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 839

def get_commit(params = {}, options = {})
  req = build_request(:get_commit, params)
  req.send_request(options)
end

#get_differences(params = {}) ⇒ Types::GetDifferencesOutput

Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID or other fully qualified reference). Results can be limited to a specified path.

Examples:

Request syntax with placeholder values


resp = client.get_differences({
  repository_name: "RepositoryName", # required
  before_commit_specifier: "CommitName",
  after_commit_specifier: "CommitName", # required
  before_path: "Path",
  after_path: "Path",
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.differences #=> Array
resp.differences[0].before_blob.blob_id #=> String
resp.differences[0].before_blob.path #=> String
resp.differences[0].before_blob.mode #=> String
resp.differences[0].after_blob.blob_id #=> String
resp.differences[0].after_blob.path #=> String
resp.differences[0].after_blob.mode #=> String
resp.differences[0].change_type #=> String, one of "A", "M", "D"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to get differences.

  • :before_commit_specifier (String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, the full commit ID. Optional. If not specified, all changes prior to the afterCommitSpecifier value will be shown. If you do not use beforeCommitSpecifier in your request, consider limiting the results with maxResults.

  • :after_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit.

  • :before_path (String)

    The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If beforePath and afterPath are not specified, differences will be shown for all paths.

  • :after_path (String)

    The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences will be shown for all paths.

  • :max_results (Integer)

    A non-negative integer used to limit the number of returned results.

  • :next_token (String)

    An enumeration token that when provided in a request, returns the next batch of the results.

Returns:

See Also:



914
915
916
917
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 914

def get_differences(params = {}, options = {})
  req = build_request(:get_differences, params)
  req.send_request(options)
end

#get_merge_conflicts(params = {}) ⇒ Types::GetMergeConflictsOutput

Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.

Examples:

Request syntax with placeholder values


resp = client.get_merge_conflicts({
  repository_name: "RepositoryName", # required
  destination_commit_specifier: "CommitName", # required
  source_commit_specifier: "CommitName", # required
  merge_option: "FAST_FORWARD_MERGE", # required, accepts FAST_FORWARD_MERGE
})

Response structure


resp.mergeable #=> Boolean
resp.destination_commit_id #=> String
resp.source_commit_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where the pull request was created.

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, a branch name or a full commit ID.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, a branch name or a full commit ID.

  • :merge_option (required, String)

    The merge option or strategy you want to use to merge the code. The only valid value is FAST_FORWARD_MERGE.

Returns:

See Also:



962
963
964
965
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 962

def get_merge_conflicts(params = {}, options = {})
  req = build_request(:get_merge_conflicts, params)
  req.send_request(options)
end

#get_pull_request(params = {}) ⇒ Types::GetPullRequestOutput

Gets information about a pull request in a specified repository.

Examples:

Request syntax with placeholder values


resp = client.get_pull_request({
  pull_request_id: "PullRequestId", # required
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

Returns:

See Also:



1006
1007
1008
1009
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1006

def get_pull_request(params = {}, options = {})
  req = build_request(:get_pull_request, params)
  req.send_request(options)
end

#get_repository(params = {}) ⇒ Types::GetRepositoryOutput

Returns information about a repository.

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Examples:

Request syntax with placeholder values


resp = client.get_repository({
  repository_name: "RepositoryName", # required
})

Response structure


resp.. #=> String
resp..repository_id #=> String
resp..repository_name #=> String
resp..repository_description #=> String
resp..default_branch #=> String
resp..last_modified_date #=> Time
resp..creation_date #=> Time
resp..clone_url_http #=> String
resp..clone_url_ssh #=> String
resp..arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to get information about.

Returns:

See Also:



1052
1053
1054
1055
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1052

def get_repository(params = {}, options = {})
  req = build_request(:get_repository, params)
  req.send_request(options)
end

#get_repository_triggers(params = {}) ⇒ Types::GetRepositoryTriggersOutput

Gets information about triggers configured for a repository.

Examples:

Request syntax with placeholder values


resp = client.get_repository_triggers({
  repository_name: "RepositoryName", # required
})

Response structure


resp.configuration_id #=> String
resp.triggers #=> Array
resp.triggers[0].name #=> String
resp.triggers[0].destination_arn #=> String
resp.triggers[0].custom_data #=> String
resp.triggers[0].branches #=> Array
resp.triggers[0].branches[0] #=> String
resp.triggers[0].events #=> Array
resp.triggers[0].events[0] #=> String, one of "all", "updateReference", "createReference", "deleteReference"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which the trigger is configured.

Returns:

See Also:



1089
1090
1091
1092
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1089

def get_repository_triggers(params = {}, options = {})
  req = build_request(:get_repository_triggers, params)
  req.send_request(options)
end

#list_branches(params = {}) ⇒ Types::ListBranchesOutput

Gets information about one or more branches in a repository.

Examples:

Request syntax with placeholder values


resp = client.list_branches({
  repository_name: "RepositoryName", # required
  next_token: "NextToken",
})

Response structure


resp.branches #=> Array
resp.branches[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the branches.

  • :next_token (String)

    An enumeration token that allows the operation to batch the results.

Returns:

See Also:



1124
1125
1126
1127
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1124

def list_branches(params = {}, options = {})
  req = build_request(:list_branches, params)
  req.send_request(options)
end

#list_pull_requests(params = {}) ⇒ Types::ListPullRequestsOutput

Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.

Examples:

Request syntax with placeholder values


resp = client.list_pull_requests({
  repository_name: "RepositoryName", # required
  author_arn: "Arn",
  pull_request_status: "OPEN", # accepts OPEN, CLOSED
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.pull_request_ids #=> Array
resp.pull_request_ids[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which you want to list pull requests.

  • :author_arn (String)

    Optional. The Amazon Resource Name (ARN) of the user who created the pull request. If used, this filters the results to pull requests created by that user.

  • :pull_request_status (String)

    Optional. The status of the pull request. If used, this refines the results to the pull requests that match the specified status.

  • :next_token (String)

    An enumeration token that when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-negative integer used to limit the number of returned results.

Returns:

See Also:



1176
1177
1178
1179
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1176

def list_pull_requests(params = {}, options = {})
  req = build_request(:list_pull_requests, params)
  req.send_request(options)
end

#list_repositories(params = {}) ⇒ Types::ListRepositoriesOutput

Gets information about one or more repositories.

Examples:

Request syntax with placeholder values


resp = client.list_repositories({
  next_token: "NextToken",
  sort_by: "repositoryName", # accepts repositoryName, lastModifiedDate
  order: "ascending", # accepts ascending, descending
})

Response structure


resp.repositories #=> Array
resp.repositories[0].repository_name #=> String
resp.repositories[0].repository_id #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

  • :sort_by (String)

    The criteria used to sort the results of a list repositories operation.

  • :order (String)

    The order in which to sort the results of a list repositories operation.

Returns:

See Also:



1221
1222
1223
1224
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1221

def list_repositories(params = {}, options = {})
  req = build_request(:list_repositories, params)
  req.send_request(options)
end

#merge_pull_request_by_fast_forward(params = {}) ⇒ Types::MergePullRequestByFastForwardOutput

Closes a pull request and attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge option.

Examples:

Request syntax with placeholder values


resp = client.merge_pull_request_by_fast_forward({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName", # required
  source_commit_id: "CommitId",
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (required, String)

    The name of the repository where the pull request was created.

  • :source_commit_id (String)

    The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.

Returns:

See Also:



1278
1279
1280
1281
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1278

def merge_pull_request_by_fast_forward(params = {}, options = {})
  req = build_request(:merge_pull_request_by_fast_forward, params)
  req.send_request(options)
end

#post_comment_for_compared_commit(params = {}) ⇒ Types::PostCommentForComparedCommitOutput

Posts a comment on the comparison between two commits.

Examples:

Request syntax with placeholder values


resp = client.post_comment_for_compared_commit({
  repository_name: "RepositoryName", # required
  before_commit_id: "CommitId",
  after_commit_id: "CommitId", # required
  location: {
    file_path: "Path",
    file_position: 1,
    relative_file_version: "BEFORE", # accepts BEFORE, AFTER
  },
  content: "Content", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.repository_name #=> String
resp.before_commit_id #=> String
resp.after_commit_id #=> String
resp.before_blob_id #=> String
resp.after_blob_id #=> String
resp.location.file_path #=> String
resp.location.file_position #=> Integer
resp.location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to post a comment on the comparison between commits.

  • :before_commit_id (String)

    To establish the directionality of the comparison, the full commit ID of the 'before' commit.

  • :after_commit_id (required, String)

    To establish the directionality of the comparison, the full commit ID of the 'after' commit.

  • :location (Types::Location)

    The location of the comparison where you want to comment.

  • :content (required, String)

    The content of the comment you want to make.

  • :client_request_token (String)

    A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



1361
1362
1363
1364
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1361

def post_comment_for_compared_commit(params = {}, options = {})
  req = build_request(:post_comment_for_compared_commit, params)
  req.send_request(options)
end

#post_comment_for_pull_request(params = {}) ⇒ Types::PostCommentForPullRequestOutput

Posts a comment on a pull request.

Examples:

Request syntax with placeholder values


resp = client.post_comment_for_pull_request({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName", # required
  before_commit_id: "CommitId", # required
  after_commit_id: "CommitId", # required
  location: {
    file_path: "Path",
    file_position: 1,
    relative_file_version: "BEFORE", # accepts BEFORE, AFTER
  },
  content: "Content", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.repository_name #=> String
resp.pull_request_id #=> String
resp.before_commit_id #=> String
resp.after_commit_id #=> String
resp.before_blob_id #=> String
resp.after_blob_id #=> String
resp.location.file_path #=> String
resp.location.file_position #=> Integer
resp.location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (required, String)

    The name of the repository where you want to post a comment on a pull request.

  • :before_commit_id (required, String)

    The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.

  • :after_commit_id (required, String)

    The full commit ID of the commit in the source branch that is the current tip of the branch for the pull request when you post the comment.

  • :location (Types::Location)

    The location of the change where you want to post your comment. If no location is provided, the comment will be posted as a general comment on the pull request difference between the before commit ID and the after commit ID.

  • :content (required, String)

    The content of your comment on the change.

  • :client_request_token (String)

    A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



1455
1456
1457
1458
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1455

def post_comment_for_pull_request(params = {}, options = {})
  req = build_request(:post_comment_for_pull_request, params)
  req.send_request(options)
end

#post_comment_reply(params = {}) ⇒ Types::PostCommentReplyOutput

Posts a comment in reply to an existing comment on a comparison between commits or a pull request.

Examples:

Request syntax with placeholder values


resp = client.post_comment_reply({
  in_reply_to: "CommentId", # required
  client_request_token: "ClientRequestToken",
  content: "Content", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :in_reply_to (required, String)

    The system-generated ID of the comment to which you want to reply. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

  • :client_request_token (String)

    A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :content (required, String)

    The contents of your reply to a comment.

Returns:

See Also:



1508
1509
1510
1511
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1508

def post_comment_reply(params = {}, options = {})
  req = build_request(:post_comment_reply, params)
  req.send_request(options)
end

#put_repository_triggers(params = {}) ⇒ Types::PutRepositoryTriggersOutput

Replaces all triggers for a repository. This can be used to create or delete triggers.

Examples:

Request syntax with placeholder values


resp = client.put_repository_triggers({
  repository_name: "RepositoryName", # required
  triggers: [ # required
    {
      name: "RepositoryTriggerName", # required
      destination_arn: "Arn", # required
      custom_data: "RepositoryTriggerCustomData",
      branches: ["BranchName"],
      events: ["all"], # required, accepts all, updateReference, createReference, deleteReference
    },
  ],
})

Response structure


resp.configuration_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to create or update the trigger.

  • :triggers (required, Array<Types::RepositoryTrigger>)

    The JSON block of configuration information for each trigger.

Returns:

See Also:



1550
1551
1552
1553
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1550

def put_repository_triggers(params = {}, options = {})
  req = build_request(:put_repository_triggers, params)
  req.send_request(options)
end

#test_repository_triggers(params = {}) ⇒ Types::TestRepositoryTriggersOutput

Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test will send data from the last commit. If no data is available, sample data will be generated.

Examples:

Request syntax with placeholder values


resp = client.test_repository_triggers({
  repository_name: "RepositoryName", # required
  triggers: [ # required
    {
      name: "RepositoryTriggerName", # required
      destination_arn: "Arn", # required
      custom_data: "RepositoryTriggerCustomData",
      branches: ["BranchName"],
      events: ["all"], # required, accepts all, updateReference, createReference, deleteReference
    },
  ],
})

Response structure


resp.successful_executions #=> Array
resp.successful_executions[0] #=> String
resp.failed_executions #=> Array
resp.failed_executions[0].trigger #=> String
resp.failed_executions[0].failure_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository in which to test the triggers.

  • :triggers (required, Array<Types::RepositoryTrigger>)

    The list of triggers to test.

Returns:

See Also:



1598
1599
1600
1601
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1598

def test_repository_triggers(params = {}, options = {})
  req = build_request(:test_repository_triggers, params)
  req.send_request(options)
end

#update_comment(params = {}) ⇒ Types::UpdateCommentOutput

Replaces the contents of a comment.

Examples:

Request syntax with placeholder values


resp = client.update_comment({
  comment_id: "CommentId", # required
  content: "Content", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The system-generated ID of the comment you want to update. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

  • :content (required, String)

    The updated content with which you want to replace the existing content of the comment.

Returns:

See Also:



1639
1640
1641
1642
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1639

def update_comment(params = {}, options = {})
  req = build_request(:update_comment, params)
  req.send_request(options)
end

#update_default_branch(params = {}) ⇒ Struct

Sets or changes the default branch name for the specified repository.

If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.

Examples:

Request syntax with placeholder values


resp = client.update_default_branch({
  repository_name: "RepositoryName", # required
  default_branch_name: "BranchName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to set or change the default branch for.

  • :default_branch_name (required, String)

    The name of the branch to set as the default.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1671
1672
1673
1674
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1671

def update_default_branch(params = {}, options = {})
  req = build_request(:update_default_branch, params)
  req.send_request(options)
end

#update_pull_request_description(params = {}) ⇒ Types::UpdatePullRequestDescriptionOutput

Replaces the contents of the description of a pull request.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_description({
  pull_request_id: "PullRequestId", # required
  description: "Description", # required
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :description (required, String)

    The updated content of the description for the pull request. This content will replace the existing description.

Returns:

See Also:



1720
1721
1722
1723
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1720

def update_pull_request_description(params = {}, options = {})
  req = build_request(:update_pull_request_description, params)
  req.send_request(options)
end

#update_pull_request_status(params = {}) ⇒ Types::UpdatePullRequestStatusOutput

Updates the status of a pull request.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_status({
  pull_request_id: "PullRequestId", # required
  pull_request_status: "OPEN", # required, accepts OPEN, CLOSED
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :pull_request_status (required, String)

    The status of the pull request. The only valid operations are to update the status from OPEN to OPEN, OPEN to CLOSED or from from CLOSED to CLOSED.

Returns:

See Also:



1770
1771
1772
1773
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1770

def update_pull_request_status(params = {}, options = {})
  req = build_request(:update_pull_request_status, params)
  req.send_request(options)
end

#update_pull_request_title(params = {}) ⇒ Types::UpdatePullRequestTitleOutput

Replaces the title of a pull request.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_title({
  pull_request_id: "PullRequestId", # required
  title: "Title", # required
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.client_request_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :title (required, String)

    The updated title of the pull request. This will replace the existing title.

Returns:

See Also:



1819
1820
1821
1822
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1819

def update_pull_request_title(params = {}, options = {})
  req = build_request(:update_pull_request_title, params)
  req.send_request(options)
end

#update_repository_description(params = {}) ⇒ Struct

Sets or changes the comment or description for a repository.

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Examples:

Request syntax with placeholder values


resp = client.update_repository_description({
  repository_name: "RepositoryName", # required
  repository_description: "RepositoryDescription",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to set or change the comment or description for.

  • :repository_description (String)

    The new comment or description for the specified repository. Repository descriptions are limited to 1,000 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1856
1857
1858
1859
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1856

def update_repository_description(params = {}, options = {})
  req = build_request(:update_repository_description, params)
  req.send_request(options)
end

#update_repository_name(params = {}) ⇒ Struct

Renames a repository. The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix ".git" is prohibited. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide.

Examples:

Request syntax with placeholder values


resp = client.update_repository_name({
  old_name: "RepositoryName", # required
  new_name: "RepositoryName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :old_name (required, String)

    The existing name of the repository.

  • :new_name (required, String)

    The new name for the repository.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1891
1892
1893
1894
# File 'gems/aws-sdk-codecommit/lib/aws-sdk-codecommit/client.rb', line 1891

def update_repository_name(params = {}, options = {})
  req = build_request(:update_repository_name, params)
  req.send_request(options)
end