evaluate_pull_request_approval_rules

CodeCommit.Client.evaluate_pull_request_approval_rules(**kwargs)

Evaluates whether a pull request has met all the conditions specified in its associated approval rules.

See also: AWS API Documentation

Request Syntax

response = client.evaluate_pull_request_approval_rules(
    pullRequestId='string',
    revisionId='string'
)
Parameters
  • pullRequestId (string) --

    [REQUIRED]

    The system-generated ID of the pull request you want to evaluate.

  • revisionId (string) --

    [REQUIRED]

    The system-generated ID for the pull request revision. To retrieve the most recent revision ID for a pull request, use GetPullRequest.

Return type

dict

Returns

Response Syntax

{
    'evaluation': {
        'approved': True|False,
        'overridden': True|False,
        'approvalRulesSatisfied': [
            'string',
        ],
        'approvalRulesNotSatisfied': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • evaluation (dict) --

      The result of the evaluation, including the names of the rules whose conditions have been met (if any), the names of the rules whose conditions have not been met (if any), whether the pull request is in the approved state, and whether the pull request approval rule has been set aside by an override.

      • approved (boolean) --

        Whether the state of the pull request is approved.

      • overridden (boolean) --

        Whether the approval rule requirements for the pull request have been overridden and no longer need to be met.

      • approvalRulesSatisfied (list) --

        The names of the approval rules that have had their conditions met.

        • (string) --
      • approvalRulesNotSatisfied (list) --

        The names of the approval rules that have not had their conditions met.

        • (string) --

Exceptions

  • CodeCommit.Client.exceptions.PullRequestDoesNotExistException
  • CodeCommit.Client.exceptions.InvalidPullRequestIdException
  • CodeCommit.Client.exceptions.PullRequestIdRequiredException
  • CodeCommit.Client.exceptions.InvalidRevisionIdException
  • CodeCommit.Client.exceptions.RevisionIdRequiredException
  • CodeCommit.Client.exceptions.RevisionNotCurrentException
  • CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
  • CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
  • CodeCommit.Client.exceptions.EncryptionKeyDisabledException
  • CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
  • CodeCommit.Client.exceptions.EncryptionKeyUnavailableException