merge_pull_request_by_fast_forward
¶
merge_pull_request_by_fast_forward(
pull_request_id: PullRequestId,
repository_name: RepositoryName,
*,
config_overrides: Optional[CodeCommitClientConfig] = None,
source_commit_id: Optional[ObjectId] = None,
) -> MergePullRequestByFastForwardOutput
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 strategy. If the merge is successful, it closes the pull request.
Parameters:
-
pull_request_id(PullRequestId) –The system-generated ID of the pull request. To get this ID, use ListPullRequests.
-
repository_name(RepositoryName) –The name of the repository where the pull request was created.
-
source_commit_id(Optional[ObjectId], default:None) –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.
Raises:
-
ConcurrentReferenceUpdateException–The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
-
EncryptionIntegrityChecksFailedException–An encryption integrity check failed.
-
EncryptionKeyAccessDeniedException–An encryption key could not be accessed.
-
EncryptionKeyDisabledException–The encryption key is disabled.
-
EncryptionKeyNotFoundException–No encryption key was found.
-
EncryptionKeyUnavailableException–The encryption key is not available.
-
InvalidCommitIdException–The specified commit ID is not valid.
-
InvalidPullRequestIdException–The pull request ID is not valid. Make sure that you have provided the full ID and that the pull request is in the specified repository, and then try again.
-
InvalidRepositoryNameException–A specified repository name is not valid.
This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.
-
ManualMergeRequiredException–The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
-
PullRequestAlreadyClosedException–The pull request status cannot be updated because it is already closed.
-
PullRequestApprovalRulesNotSatisfiedException–The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
-
PullRequestDoesNotExistException–The pull request ID could not be found. Make sure that you have specified the correct repository name and pull request ID, and then try again.
-
PullRequestIdRequiredException–A pull request ID is required, but none was provided.
-
ReferenceDoesNotExistException–The specified reference does not exist. You must provide a full commit ID.
-
RepositoryDoesNotExistException–The specified repository does not exist.
-
RepositoryNameRequiredException–A repository name is required, but was not specified.
-
RepositoryNotAssociatedWithPullRequestException–The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
-
TipOfSourceReferenceIsDifferentException–The tip of the source branch in the destination repository does not match the tip of the source branch specified in your request. The pull request might have been updated. Make sure that you have the latest changes.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codecommit/_services/code_commit.py
4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 | |