import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CodeCommitClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeCommitClient"; import type { MergePullRequestByFastForwardInput, MergePullRequestByFastForwardOutput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link MergePullRequestByFastForwardCommand}. */ export interface MergePullRequestByFastForwardCommandInput extends MergePullRequestByFastForwardInput { } /** * @public * * The output of {@link MergePullRequestByFastForwardCommand}. */ export interface MergePullRequestByFastForwardCommandOutput extends MergePullRequestByFastForwardOutput, __MetadataBearer { } declare const MergePullRequestByFastForwardCommand_base: { new (input: MergePullRequestByFastForwardCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: MergePullRequestByFastForwardCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CodeCommitClient, MergePullRequestByFastForwardCommand } from "@aws-sdk/client-codecommit"; // ES Modules import * // const { CodeCommitClient, MergePullRequestByFastForwardCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import * // import type { CodeCommitClientConfig } from "@aws-sdk/client-codecommit"; * const config = {}; // type is CodeCommitClientConfig * const client = new CodeCommitClient(config); * const input = { // MergePullRequestByFastForwardInput * pullRequestId: "STRING_VALUE", // required * repositoryName: "STRING_VALUE", // required * sourceCommitId: "STRING_VALUE", * }; * const command = new MergePullRequestByFastForwardCommand(input); * const response = await client.send(command); * // { // MergePullRequestByFastForwardOutput * // pullRequest: { // PullRequest * // pullRequestId: "STRING_VALUE", * // title: "STRING_VALUE", * // description: "STRING_VALUE", * // lastActivityDate: new Date("TIMESTAMP"), * // creationDate: new Date("TIMESTAMP"), * // pullRequestStatus: "OPEN" || "CLOSED", * // authorArn: "STRING_VALUE", * // pullRequestTargets: [ // PullRequestTargetList * // { // PullRequestTarget * // repositoryName: "STRING_VALUE", * // sourceReference: "STRING_VALUE", * // destinationReference: "STRING_VALUE", * // destinationCommit: "STRING_VALUE", * // sourceCommit: "STRING_VALUE", * // mergeBase: "STRING_VALUE", * // mergeMetadata: { // MergeMetadata * // isMerged: true || false, * // mergedBy: "STRING_VALUE", * // mergeCommitId: "STRING_VALUE", * // mergeOption: "FAST_FORWARD_MERGE" || "SQUASH_MERGE" || "THREE_WAY_MERGE", * // }, * // }, * // ], * // clientRequestToken: "STRING_VALUE", * // revisionId: "STRING_VALUE", * // approvalRules: [ // ApprovalRulesList * // { // ApprovalRule * // approvalRuleId: "STRING_VALUE", * // approvalRuleName: "STRING_VALUE", * // approvalRuleContent: "STRING_VALUE", * // ruleContentSha256: "STRING_VALUE", * // lastModifiedDate: new Date("TIMESTAMP"), * // creationDate: new Date("TIMESTAMP"), * // lastModifiedUser: "STRING_VALUE", * // originApprovalRuleTemplate: { // OriginApprovalRuleTemplate * // approvalRuleTemplateId: "STRING_VALUE", * // approvalRuleTemplateName: "STRING_VALUE", * // }, * // }, * // ], * // }, * // }; * * ``` * * @param MergePullRequestByFastForwardCommandInput - {@link MergePullRequestByFastForwardCommandInput} * @returns {@link MergePullRequestByFastForwardCommandOutput} * @see {@link MergePullRequestByFastForwardCommandInput} for command's `input` shape. * @see {@link MergePullRequestByFastForwardCommandOutput} for command's `response` shape. * @see {@link CodeCommitClientResolvedConfig | config} for CodeCommitClient's `config` shape. * * @throws {@link ConcurrentReferenceUpdateException} (client fault) *

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.

* * @throws {@link EncryptionIntegrityChecksFailedException} (server fault) *

An encryption integrity check failed.

* * @throws {@link EncryptionKeyAccessDeniedException} (client fault) *

An encryption key could not be accessed.

* * @throws {@link EncryptionKeyDisabledException} (client fault) *

The encryption key is disabled.

* * @throws {@link EncryptionKeyNotFoundException} (client fault) *

No encryption key was found.

* * @throws {@link EncryptionKeyUnavailableException} (client fault) *

The encryption key is not available.

* * @throws {@link InvalidCommitIdException} (client fault) *

The specified commit ID is not valid.

* * @throws {@link InvalidPullRequestIdException} (client fault) *

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.

* * @throws {@link InvalidRepositoryNameException} (client fault) *

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.

*
* * @throws {@link ManualMergeRequiredException} (client fault) *

The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.

* * @throws {@link PullRequestAlreadyClosedException} (client fault) *

The pull request status cannot be updated because it is already closed.

* * @throws {@link PullRequestApprovalRulesNotSatisfiedException} (client fault) *

The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.

* * @throws {@link PullRequestDoesNotExistException} (client fault) *

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.

* * @throws {@link PullRequestIdRequiredException} (client fault) *

A pull request ID is required, but none was provided.

* * @throws {@link ReferenceDoesNotExistException} (client fault) *

The specified reference does not exist. You must provide a full commit ID.

* * @throws {@link RepositoryDoesNotExistException} (client fault) *

The specified repository does not exist.

* * @throws {@link RepositoryNameRequiredException} (client fault) *

A repository name is required, but was not specified.

* * @throws {@link RepositoryNotAssociatedWithPullRequestException} (client fault) *

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.

* * @throws {@link TipOfSourceReferenceIsDifferentException} (client fault) *

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.

* * @throws {@link CodeCommitServiceException} *

Base exception class for all service exceptions from CodeCommit service.

* * * @public */ export declare class MergePullRequestByFastForwardCommand extends MergePullRequestByFastForwardCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: MergePullRequestByFastForwardInput; output: MergePullRequestByFastForwardOutput; }; sdk: { input: MergePullRequestByFastForwardCommandInput; output: MergePullRequestByFastForwardCommandOutput; }; }; }