Skip to content

Commit 28cb739

Browse files
committed
use copilot prefix
1 parent 487f153 commit 28cb739

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/github/copilotRemoteAgent/gitOperationsManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class GitOperationsManager {
1717
const config = vscode.workspace.getConfiguration('git');
1818
const branchWhitespaceChar = config.get<string>('branchWhitespaceChar')!;
1919

20-
const asyncBranch = await this.generateRandomBranchName(repository, branchWhitespaceChar);
20+
const asyncBranch = await this.generateRandomBranchName(repository, 'copilot', branchWhitespaceChar);
2121

2222
try {
2323
await repository.createBranch(asyncBranch, true);
@@ -143,8 +143,8 @@ export class GitOperationsManager {
143143
}
144144
}
145145

146-
// Taken from https://github.com/microsoft/vscode/blob/e35e3b4e057450ea3d90c724fae5e3e9619b96fe/extensions/git/src/commands.ts#L3007
147-
private async generateRandomBranchName(repository: Repository, separator: string): Promise<string> {
146+
// Adapted from https://github.com/microsoft/vscode/blob/e35e3b4e057450ea3d90c724fae5e3e9619b96fe/extensions/git/src/commands.ts#L3007
147+
private async generateRandomBranchName(repository: Repository, prefix: string, separator: string): Promise<string> {
148148
const config = vscode.workspace.getConfiguration('git');
149149
const branchRandomNameDictionary = config.get<string[]>('branchRandomName.dictionary')!;
150150

@@ -170,7 +170,7 @@ export class GitOperationsManager {
170170

171171
// 5 attempts to generate a random branch name
172172
for (let index = 0; index < 5; index++) {
173-
const randomName = uniqueNamesGenerator({
173+
const randomName = prefix + '/' + uniqueNamesGenerator({
174174
dictionaries,
175175
length: dictionaries.length,
176176
separator

0 commit comments

Comments
 (0)