Skip to main content

sendPullRequest

client.environments.sendPullRequest(id: string, data: SendPullRequestRequest): Promise<unknown>

Sends a pull request from the environment's current state.

Creates a pull request on the remote repository using the changes present in the environment. The PR details are specified in the request.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the environment
dataSendPullRequestRequestYesPull request details including title, description, and target branch

Returns​

Promise<unknown> — A promise that resolves when the pull request has been created

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.environments.sendPullRequest('id', /* SendPullRequestRequest */);
console.log(result);