Skip to main content
// 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

baseBranch
string
required
The ephemeral branch to promote.
targetBranch
string
Destination branch name in the default namespace. Defaults to baseBranch when omitted.

Response

targetBranch
string
The name of the promoted branch in the default namespace.