From b2dc120dafbf04cfeeb4cc3afd50c504a023abb7 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 5 Nov 2022 23:50:08 -0400 Subject: [PATCH] Closes #1789 adds emojis to rebase editor --- CHANGELOG.md | 1 + src/webviews/rebase/rebaseEditor.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4160b1c..7133d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Shows the _Commit Details_ view on commit selection - Adds full (multiline) commit message - Adds the `f` fixup shortcut key to UI + - Adds emoji support for commit messages — closes [#1789](https://github.com/gitkraken/vscode-gitlens/issues/1789) - Ensures that large rebases show rich commit details - Changes the _Home_ view to always be available diff --git a/src/webviews/rebase/rebaseEditor.ts b/src/webviews/rebase/rebaseEditor.ts index 36a9593..4225b03 100644 --- a/src/webviews/rebase/rebaseEditor.ts +++ b/src/webviews/rebase/rebaseEditor.ts @@ -6,6 +6,7 @@ import { GitActions } from '../../commands/gitCommands.actions'; import { configuration } from '../../configuration'; import { CoreCommands } from '../../constants'; import type { Container } from '../../container'; +import { emojify } from '../../emojis'; import type { GitCommit } from '../../git/models/commit'; import { RepositoryChange, RepositoryChangeComparisonMode } from '../../git/models/repository'; import { Logger } from '../../logger'; @@ -597,7 +598,7 @@ export class RebaseEditorProvider implements CustomTextEditorProvider, Disposabl author: commit.author.name, date: commit.formatDate(defaultDateFormat), dateFromNow: commit.formatDateFromNow(), - message: commit.message ?? commit.summary, + message: emojify(commit.message ?? commit.summary), }; } @@ -613,7 +614,7 @@ export class RebaseEditorProvider implements CustomTextEditorProvider, Disposabl author: ontoCommit.author.name, date: ontoCommit.formatDate(defaultDateFormat), dateFromNow: ontoCommit.formatDateFromNow(), - message: ontoCommit.message || 'root', + message: emojify(ontoCommit.message || 'root'), } : undefined, }