Skip to content

Commit 63de43b

Browse files
authored
When using a branch name as a PR title, ensure the first letter is capitalised (#2848)
Fixes #2847
1 parent 70b7f09 commit 63de43b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/github/createPRViewProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ export class CreatePullRequestViewProvider extends WebviewViewBase implements vs
136136
}
137137

138138
if (useBranchName) {
139-
return this.compareBranch?.name ?? '';
139+
const name = this.compareBranch?.name;
140+
return name
141+
? `${name.charAt(0).toUpperCase()}${name.slice(1)}`
142+
: '';
140143
} else {
141144
return this.compareBranch?.name
142145
? titleAndBodyFrom(await this._folderRepositoryManager.getTipCommitMessage(this.compareBranch.name))

0 commit comments

Comments
 (0)