Skip to content

Commit 6c0de64

Browse files
committed
Renames ${name} token to ${emailName} for clarity
(#5155)
1 parent a6ca1a8 commit 6c0de64

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
99
### Added
1010

1111
- Adds a close-tab warning banner to the _Interactive Rebase_ editor — displays a dismissible informational banner during the planning phase to clarify that closing the tab automatically starts the rebase ([#5123](https://github.com/gitkraken/vscode-gitlens/issues/5123))
12-
- Adds an optional `avatar` URL template to custom remotes in the `gitlens.remotes` setting — enables corporate and self-hosted setups to resolve commit-author avatars via a templated URL with `${email}`, `${name}`, `${domain}`, and `${size}` tokens ([#302](https://github.com/gitkraken/vscode-gitlens/issues/302)) — thanks to [PR #1636](https://github.com/gitkraken/vscode-gitlens/pull/1636) by Tmk ([@tmkx](https://github.com/tmkx))
12+
- Adds an optional `avatar` URL template to custom remotes in the `gitlens.remotes` setting — enables corporate and self-hosted setups to resolve commit-author avatars via a templated URL with `${email}`, `${emailName}`, `${domain}`, and `${size}` tokens ([#302](https://github.com/gitkraken/vscode-gitlens/issues/302)) — thanks to [PR #1636](https://github.com/gitkraken/vscode-gitlens/pull/1636) by Tmk ([@tmkx](https://github.com/tmkx))
1313

1414
### Fixed
1515

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4105,7 +4105,7 @@
41054105
},
41064106
"avatar": {
41074107
"type": "string",
4108-
"markdownDescription": "Specifies the format of an avatar URL for the custom remote service\n\nAvailable tokens\\\n`${email}` — contributor email\\\n`${name}` — email local-part\\\n`${domain}` — email domain\\\n`${size}` — avatar size"
4108+
"markdownDescription": "Specifies the format of an avatar URL for the custom remote service\n\nAvailable tokens\\\n`${email}` — contributor email\\\n`${emailName}` — email local-part\\\n`${domain}` — email domain\\\n`${size}` — avatar size"
41094109
}
41104110
},
41114111
"additionalProperties": false

packages/git/src/remotes/custom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ export class CustomRemoteProvider extends RemoteProvider {
3737

3838
getUrlForAvatar(email: string, size: number): string | undefined {
3939
if (this.urls.avatar != null) {
40-
const [name, domain] = email.split('@');
40+
const [emailName, domain] = email.split('@');
4141
return this.encodeUrl(
4242
interpolate(
4343
this.urls.avatar,
44-
this.getContext({ name: name, domain: domain, email: email, size: String(size) }),
44+
this.getContext({ emailName: emailName, domain: domain, email: email, size: String(size) }),
4545
),
4646
);
4747
}

0 commit comments

Comments
 (0)