Skip to content

Create Pull Request

codecommit_create_pull_request R Documentation

Creates a pull request in the specified repository

Description

Creates a pull request in the specified repository.

Usage

codecommit_create_pull_request(title, description, targets,
  clientRequestToken)

Arguments

title

[required] The title of the pull request. This title is used to identify the pull request to other users in the repository.

description

A description of the pull request.

targets

[required] 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).

clientRequestToken

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 returns information about the initial request that used that token.

The Amazon Web ServicesSDKs prepopulate client request tokens. If you are using an Amazon Web ServicesSDK, an idempotency token is created for you.

Value

A list with the following syntax:

list(
  pullRequest = list(
    pullRequestId = "string",
    title = "string",
    description = "string",
    lastActivityDate = as.POSIXct(
      "2015-01-01"
    ),
    creationDate = as.POSIXct(
      "2015-01-01"
    ),
    pullRequestStatus = "OPEN"|"CLOSED",
    authorArn = "string",
    pullRequestTargets = list(
      list(
        repositoryName = "string",
        sourceReference = "string",
        destinationReference = "string",
        destinationCommit = "string",
        sourceCommit = "string",
        mergeBase = "string",
        mergeMetadata = list(
          isMerged = TRUE|FALSE,
          mergedBy = "string",
          mergeCommitId = "string",
          mergeOption = "FAST_FORWARD_MERGE"|"SQUASH_MERGE"|"THREE_WAY_MERGE"
        )
      )
    ),
    clientRequestToken = "string",
    revisionId = "string",
    approvalRules = list(
      list(
        approvalRuleId = "string",
        approvalRuleName = "string",
        approvalRuleContent = "string",
        ruleContentSha256 = "string",
        lastModifiedDate = as.POSIXct(
          "2015-01-01"
        ),
        creationDate = as.POSIXct(
          "2015-01-01"
        ),
        lastModifiedUser = "string",
        originApprovalRuleTemplate = list(
          approvalRuleTemplateId = "string",
          approvalRuleTemplateName = "string"
        )
      )
    )
  )
)

Request syntax

svc$create_pull_request(
  title = "string",
  description = "string",
  targets = list(
    list(
      repositoryName = "string",
      sourceReference = "string",
      destinationReference = "string"
    )
  ),
  clientRequestToken = "string"
)