// Promote in place (same branch name)
const result = await repo.promoteEphemeralBranch({
baseBranch: 'preview/pr-123',
});
console.log(result.targetBranch); // 'preview/pr-123'
// Or promote to a new name
const renamed = await repo.promoteEphemeralBranch({
baseBranch: 'preview/pr-123',
targetBranch: 'feature/awesome-change',
});
console.log(renamed.targetBranch); // 'feature/awesome-change'
Moves a branch from the ephemeral namespace into the default namespace. Once promoted, the branch is treated like any other persistent branch and will be included in Git Sync if configured.
Options
The ephemeral branch to promote.
Destination branch name in the default namespace. Defaults to baseBranch when omitted.
Response
The name of the promoted branch in the default namespace.