Skip to content

Create Code Review

codegurureviewer_create_code_review R Documentation

Use to create a code review with a CodeReviewType of RepositoryAnalysis

Description

Use to create a code review with a CodeReviewType of RepositoryAnalysis. This type of code review analyzes all code under a specified branch in an associated repository. PullRequest code reviews are automatically triggered by a pull request.

Usage

codegurureviewer_create_code_review(Name, RepositoryAssociationArn,
  Type, ClientRequestToken)

Arguments

Name

[required] The name of the code review. The name of each code review in your Amazon Web Services account must be unique.

RepositoryAssociationArn

[required] The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling list_repository_associations.

A code review can only be created on an associated repository. This is the ARN of the associated repository.

Type

[required] The type of code review to create. This is specified using a CodeReviewType object. You can create a code review only of type RepositoryAnalysis.

ClientRequestToken

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate code reviews if there are failures and retries.

Value

A list with the following syntax:

list(
  CodeReview = list(
    Name = "string",
    CodeReviewArn = "string",
    RepositoryName = "string",
    Owner = "string",
    ProviderType = "CodeCommit"|"GitHub"|"Bitbucket"|"GitHubEnterpriseServer"|"S3Bucket",
    State = "Completed"|"Pending"|"Failed"|"Deleting",
    StateReason = "string",
    CreatedTimeStamp = as.POSIXct(
      "2015-01-01"
    ),
    LastUpdatedTimeStamp = as.POSIXct(
      "2015-01-01"
    ),
    Type = "PullRequest"|"RepositoryAnalysis",
    PullRequestId = "string",
    SourceCodeType = list(
      CommitDiff = list(
        SourceCommit = "string",
        DestinationCommit = "string",
        MergeBaseCommit = "string"
      ),
      RepositoryHead = list(
        BranchName = "string"
      ),
      BranchDiff = list(
        SourceBranchName = "string",
        DestinationBranchName = "string"
      ),
      S3BucketRepository = list(
        Name = "string",
        Details = list(
          BucketName = "string",
          CodeArtifacts = list(
            SourceCodeArtifactsObjectKey = "string",
            BuildArtifactsObjectKey = "string"
          )
        )
      ),
      RequestMetadata = list(
        RequestId = "string",
        Requester = "string",
        EventInfo = list(
          Name = "string",
          State = "string"
        ),
        VendorName = "GitHub"|"GitLab"|"NativeS3"
      )
    ),
    AssociationArn = "string",
    Metrics = list(
      MeteredLinesOfCodeCount = 123,
      SuppressedLinesOfCodeCount = 123,
      FindingsCount = 123
    ),
    AnalysisTypes = list(
      "Security"|"CodeQuality"
    ),
    ConfigFileState = "Present"|"Absent"|"PresentWithErrors"
  )
)

Request syntax

svc$create_code_review(
  Name = "string",
  RepositoryAssociationArn = "string",
  Type = list(
    RepositoryAnalysis = list(
      RepositoryHead = list(
        BranchName = "string"
      ),
      SourceCodeType = list(
        CommitDiff = list(
          SourceCommit = "string",
          DestinationCommit = "string",
          MergeBaseCommit = "string"
        ),
        RepositoryHead = list(
          BranchName = "string"
        ),
        BranchDiff = list(
          SourceBranchName = "string",
          DestinationBranchName = "string"
        ),
        S3BucketRepository = list(
          Name = "string",
          Details = list(
            BucketName = "string",
            CodeArtifacts = list(
              SourceCodeArtifactsObjectKey = "string",
              BuildArtifactsObjectKey = "string"
            )
          )
        ),
        RequestMetadata = list(
          RequestId = "string",
          Requester = "string",
          EventInfo = list(
            Name = "string",
            State = "string"
          ),
          VendorName = "GitHub"|"GitLab"|"NativeS3"
        )
      )
    ),
    AnalysisTypes = list(
      "Security"|"CodeQuality"
    )
  ),
  ClientRequestToken = "string"
)