[ aws . codeguru-reviewer ]
Use to create a code review with a ` CodeReviewType
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html`__ 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 so cannot be created using this method.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
create-code-review
--name <value>
--repository-association-arn <value>
--type <value>
[--client-request-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--name
(string)
The name of the code review. The name of each code review in your AWS account must be unique.
--repository-association-arn
(string)
The Amazon Resource Name (ARN) of the `
RepositoryAssociation
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling `ListRepositoryAssociations
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .A code review can only be created on an associated repository. This is the ARN of the associated repository.
--type
(structure)
The type of code review to create. This is specified using a `
CodeReviewType
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html`__ object. You can create a code review only of typeRepositoryAnalysis
.RepositoryAnalysis -> (structure)
A code review that analyzes all code under a specified branch in an associated respository. The assocated repository is specified using its ARN in `
CreateCodeReview
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview`__ .RepositoryHead -> (structure)
A `
SourceCodeType
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies the tip of a branch in an associated repository.BranchName -> (string)
The name of the branch in an associated repository. The
RepositoryHeadSourceCodeType
specifies the tip of this branch.
Shorthand Syntax:
RepositoryAnalysis={RepositoryHead={BranchName=string}}
JSON Syntax:
{
"RepositoryAnalysis": {
"RepositoryHead": {
"BranchName": "string"
}
}
}
--client-request-token
(string)
Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate code reviews if there are failures and retries.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
CodeReview -> (structure)
Information about a code review. A code review belongs to the associated repository that contains the reviewed code.
Name -> (string)
The name of the code review.
CodeReviewArn -> (string)
The Amazon Resource Name (ARN) of the `
CodeReview
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html`__ object.RepositoryName -> (string)
The name of the repository.
Owner -> (string)
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType -> (string)
The type of repository that contains the reviewed code (for example, GitHub or Bitbucket).
State -> (string)
The valid code review states are:
Completed
: The code review is complete.
Pending
: The code review started and has not completed or failed.
Failed
: The code review failed.
Deleting
: The code review is being deleted.StateReason -> (string)
The reason for the state of the code review.
CreatedTimeStamp -> (timestamp)
The time, in milliseconds since the epoch, when the code review was created.
LastUpdatedTimeStamp -> (timestamp)
The time, in milliseconds since the epoch, when the code review was last updated.
Type -> (string)
The type of code review.
PullRequestId -> (string)
The pull request ID for the code review.
SourceCodeType -> (structure)
The type of the source code for the code review.
CommitDiff -> (structure)
A `
SourceCodeType
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies a commit diff created by a pull request on an associated repository.SourceCommit -> (string)
The SHA of the source commit used to generate a commit diff.
DestinationCommit -> (string)
The SHA of the destination commit used to generate a commit diff.
RepositoryHead -> (structure)
A `
SourceCodeType
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies the tip of a branch in an associated repository.BranchName -> (string)
The name of the branch in an associated repository. The
RepositoryHeadSourceCodeType
specifies the tip of this branch.AssociationArn -> (string)
The Amazon Resource Name (ARN) of the `
RepositoryAssociation
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ that contains the reviewed source code. You can retrieve associated repository ARNs by calling `ListRepositoryAssociations
https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .Metrics -> (structure)
The statistics from the code review.
MeteredLinesOfCodeCount -> (long)
Lines of code metered in the code review. For the initial code review pull request and all subsequent revisions, this includes all lines of code in the files added to the pull request. In subsequent revisions, for files that already existed in the pull request, this includes only the changed lines of code. In both cases, this does not include non-code lines such as comments and import statements. For example, if you submit a pull request containing 5 files, each with 500 lines of code, and in a subsequent revision you added a new file with 200 lines of code, and also modified a total of 25 lines across the initial 5 files,
MeteredLinesOfCodeCount
includes the first 5 files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed lines of code for a total of 2,725 lines of code.FindingsCount -> (long)
Total number of recommendations found in the code review.