export class GitHubApprovalRevocationCliGateway {
    executor;
    constructor(executor) {
        this.executor = executor;
    }
    async revoke(input) {
        if (input.reviewId === undefined) {
            throw new Error('GitHub approval revocation requires a reviewId');
        }
        const message = input.dismissalMessage ?? 'Quality gate not satisfied';
        const command = `gh api --method PUT repos/${input.projectPath}/pulls/${input.mrNumber}/reviews/${input.reviewId}/dismissals --field message=${JSON.stringify(message)}`;
        this.executor(command);
    }
}
//# sourceMappingURL=approvalRevocation.github.cli.gateway.js.map