From 69566652e49dc97d24da516e7f3384dbcfa0f2e5 Mon Sep 17 00:00:00 2001
From: Jamie Magee <JamieMagee@users.noreply.github.com>
Date: Tue, 2 Jul 2019 07:53:40 +0200
Subject: [PATCH] refactor: replace emoji shortcodes with their unicode
 equivalent (#4000)

fixes #3799
---
 lib/workers/branch/index.js                   |  8 +--
 lib/workers/pr/pr-body-config.js              | 10 ++--
 lib/workers/pr/pr-body.js                     |  6 +--
 .../onboarding/pr/config-description.js       |  2 +-
 .../onboarding/pr/errors-warnings.js          |  2 +-
 lib/workers/repository/onboarding/pr/index.js | 10 ++--
 .../repository/onboarding/pr/pr-list.js       |  2 +-
 .../pr/__snapshots__/index.spec.js.snap       | 54 +++++++++----------
 .../config-description.spec.js.snap           |  6 +--
 .../errors-warnings.spec.js.snap              |  2 +-
 .../pr/__snapshots__/pr-list.spec.js.snap     |  2 +-
 11 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index fa81300122..cc3bc071fc 100644
--- a/lib/workers/branch/index.js
+++ b/lib/workers/branch/index.js
@@ -130,7 +130,7 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
               await platform.ensureCommentRemoval(branchPr.number, subject);
             }
           } else {
-            let content = `:construction_worker: This PR has received other commits, so ${appName} will stop updating it to avoid conflicts or other problems.`;
+            let content = `👷 This PR has received other commits, so ${appName} will stop updating it to avoid conflicts or other problems.`;
             content += ` If you wish to abandon your changes and have ${appName} start over you may click the "rebase" checkbox in the PR body/description.`;
             if (!config.suppressNotifications.includes('prEditNotification')) {
               if (config.dryRun) {
@@ -364,7 +364,7 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
     const pr = await prWorker.ensurePr(config);
     // TODO: ensurePr should check for automerge itself
     if (pr) {
-      const topic = ':warning: Artifact update problem';
+      const topic = '⚠️ Artifact update problem';
       if (config.artifactErrors && config.artifactErrors.length) {
         logger.warn(
           { artifactErrors: config.artifactErrors },
@@ -375,7 +375,7 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
           config.artifactErrors.length > 1 ? 'artifacts' : 'an artifact';
         content +=
           ' related to this branch. You probably do not want to merge this PR as-is.';
-        content += `\n\n:recycle: ${appName} will retry this branch, including artifacts, only when one of the following happens:\n\n`;
+        content += `\n\n♻️ ${appName} will retry this branch, including artifacts, only when one of the following happens:\n\n`;
         content +=
           ' - any of the package files in this branch needs updating, or \n';
         content += ' - the branch becomes conflicted, or\n';
@@ -404,7 +404,7 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
             // TODO: remoe this soon once they're all cleared out
             await platform.ensureCommentRemoval(
               pr.number,
-              ':warning: Lock file problem'
+              '⚠️ Lock file problem'
             );
           }
         }
diff --git a/lib/workers/pr/pr-body-config.js b/lib/workers/pr/pr-body-config.js
index 649cf01b1b..d6ea826f2e 100644
--- a/lib/workers/pr/pr-body-config.js
+++ b/lib/workers/pr/pr-body-config.js
@@ -6,7 +6,7 @@ module.exports = {
 
 async function getPrConfigDescription(config) {
   let prBody = `\n\n---\n\n### ${appName} configuration\n\n`;
-  prBody += `:date: **Schedule**: `;
+  prBody += `📅 **Schedule**: `;
   if (
     config.schedule &&
     config.schedule !== 'at any time' &&
@@ -23,7 +23,7 @@ async function getPrConfigDescription(config) {
   }
 
   prBody += '\n\n';
-  prBody += ':vertical_traffic_light: **Automerge**: ';
+  prBody += '🚦 **Automerge**: ';
   if (config.automerge) {
     const branchStatus = await platform.getBranchStatus(
       config.branchName,
@@ -40,7 +40,7 @@ async function getPrConfigDescription(config) {
       'Disabled by config. Please merge this manually once you are satisfied.';
   }
   prBody += '\n\n';
-  prBody += ':recycle: **Rebasing**: ';
+  prBody += '♻️ **Rebasing**: ';
   if (config.rebaseStalePrs) {
     prBody += 'Whenever PR is stale';
   } else {
@@ -52,9 +52,9 @@ async function getPrConfigDescription(config) {
     prBody += '.\n\n';
   }
   if (config.recreateClosed) {
-    prBody += `:ghost: **Immortal**: This PR will be recreated if closed unmerged. Get [config help](${urls.help}) if that's undesired.\n\n`;
+    prBody += `👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](${urls.help}) if that's undesired.\n\n`;
   } else {
-    prBody += `:no_bell: **Ignore**: Close this PR and you won't be reminded about ${
+    prBody += `🔕 **Ignore**: Close this PR and you won't be reminded about ${
       config.upgrades.length === 1 ? 'this update' : 'these updates'
     } again.\n\n`;
   }
diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js
index fdd3b7211c..3269eeaa5a 100644
--- a/lib/workers/pr/pr-body.js
+++ b/lib/workers/pr/pr-body.js
@@ -154,16 +154,16 @@ async function getPrBody(config) {
 
   if (config.upgrades.some(upgrade => upgrade.gitRef)) {
     prBody +=
-      ':abcd: If you wish to disable git hash updates, add `":disableDigestUpdates"` to the extends array in your config.\n\n';
+      '🔡 If you wish to disable git hash updates, add `":disableDigestUpdates"` to the extends array in your config.\n\n';
   }
 
   if (config.updateType === 'lockFileMaintenance') {
     prBody +=
-      ':wrench: This Pull Request updates lock files to use the latest dependency versions.\n\n';
+      '🔧 This Pull Request updates lock files to use the latest dependency versions.\n\n';
   }
 
   if (config.isPin) {
-    prBody += `:pushpin: **Important**: ${appName} will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset \`:preserveSemverRanges\` your config if you instead don't wish to pin dependencies.\n\n`;
+    prBody += `📌 **Important**: ${appName} will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset \`:preserveSemverRanges\` your config if you instead don't wish to pin dependencies.\n\n`;
   }
   if (config.hasReleaseNotes) {
     let releaseNotes =
diff --git a/lib/workers/repository/onboarding/pr/config-description.js b/lib/workers/repository/onboarding/pr/config-description.js
index dec94f9926..6941f1b139 100644
--- a/lib/workers/repository/onboarding/pr/config-description.js
+++ b/lib/workers/repository/onboarding/pr/config-description.js
@@ -52,7 +52,7 @@ function getConfigDesc(config, packageFiles) {
     desc += `  - ${d}\n`;
   });
   desc += '\n';
-  desc += `:abcd: Would you like to change the way ${appName} is upgrading your dependencies?`;
+  desc += `🔡 Would you like to change the way ${appName} is upgrading your dependencies?`;
   desc += ` Simply edit the \`${defaultConfigFile}\` in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time ${appName} runs.`;
   desc += '\n\n---\n';
   return desc;
diff --git a/lib/workers/repository/onboarding/pr/errors-warnings.js b/lib/workers/repository/onboarding/pr/errors-warnings.js
index b1a783fb5c..8c1e899d20 100644
--- a/lib/workers/repository/onboarding/pr/errors-warnings.js
+++ b/lib/workers/repository/onboarding/pr/errors-warnings.js
@@ -55,7 +55,7 @@ function getDepWarnings(packageFiles) {
       { warnings, warningFiles },
       'Found package lookup warnings in onboarding'
     );
-    warningText = `\n---\n\n### :warning: Dependency Lookup Warnings :warning:\n\n`;
+    warningText = `\n---\n\n### ⚠️ Dependency Lookup Warnings ⚠️\n\n`;
     warningText += `Please correct - or verify that you can safely ignore - these lookup failures before you merge this PR.\n\n`;
     warnings.forEach(w => {
       warningText += `-   \`${w}\`\n`;
diff --git a/lib/workers/repository/onboarding/pr/index.js b/lib/workers/repository/onboarding/pr/index.js
index d3f26dd8e1..112c22a74c 100644
--- a/lib/workers/repository/onboarding/pr/index.js
+++ b/lib/workers/repository/onboarding/pr/index.js
@@ -20,8 +20,8 @@ async function ensureOnboardingPr(config, packageFiles, branches) {
   logger.debug('Filling in onboarding PR template');
   let prTemplate = `Welcome to [${appName}](${urls.homepage})! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.\n\n`;
   prTemplate += config.requireConfig
-    ? `:vertical_traffic_light: To activate ${appName}, merge this Pull Request. To disable ${appName}, simply close this Pull Request unmerged.\n\n`
-    : `:vertical_traffic_light: ${appName} will begin keeping your dependencies up-to-date only once you merge or close this Pull Request.\n\n`;
+    ? `🚦 To activate ${appName}, merge this Pull Request. To disable ${appName}, simply close this Pull Request unmerged.\n\n`
+    : `🚦 ${appName} will begin keeping your dependencies up-to-date only once you merge or close this Pull Request.\n\n`;
   prTemplate += `
 
 ---
@@ -34,7 +34,7 @@ async function ensureOnboardingPr(config, packageFiles, branches) {
 
 ---
 
-:question: Got questions? Check out ${appName}'s [Docs](${urls.documentation}), particularly the Getting Started section.
+❓ Got questions? Check out ${appName}'s [Docs](${urls.documentation}), particularly the Getting Started section.
 If you need any further assistance then you can also [request help here](${urls.help}).
 `;
   let prBody = prTemplate;
@@ -57,9 +57,9 @@ If you need any further assistance then you can also [request help here](${urls.
   if (!existingPr || existingPr.canRebase) {
     configDesc = getConfigDesc(config, packageFiles);
   } else {
-    configDesc = `### Configuration\n\n:abcd: ${appName} has detected a custom config for this PR. Feel free to ask for [help](${urls.help}) if you have any doubts and would like it reviewed.\n\n`;
+    configDesc = `### Configuration\n\n🔡 ${appName} has detected a custom config for this PR. Feel free to ask for [help](${urls.help}) if you have any doubts and would like it reviewed.\n\n`;
     if (existingPr.isConflicted) {
-      configDesc += `:warning: This PR has a merge conflict, however ${appName} is unable to automatically fix that due to edits in this branch. Please resolve the merge conflict manually.\n\n`;
+      configDesc += `⚠️ This PR has a merge conflict, however ${appName} is unable to automatically fix that due to edits in this branch. Please resolve the merge conflict manually.\n\n`;
     } else {
       configDesc += `Important: Now that this branch is edited, ${appName} can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.\n\n`;
     }
diff --git a/lib/workers/repository/onboarding/pr/pr-list.js b/lib/workers/repository/onboarding/pr/pr-list.js
index 08d503e8f3..6f4ca388c4 100644
--- a/lib/workers/repository/onboarding/pr/pr-list.js
+++ b/lib/workers/repository/onboarding/pr/pr-list.js
@@ -57,7 +57,7 @@ function getPrList(config, branches) {
     config.prHourlyLimit < 5 &&
     config.prHourlyLimit < branches.length
   ) {
-    prDesc += `<br />\n\n:children_crossing: Branch creation will be limited to maximum ${config.prHourlyLimit} per hour, so it doesn't swamp any CI resources or spam the project. See docs for \`prhourlylimit\` for details.\n\n`;
+    prDesc += `<br />\n\n🚸 Branch creation will be limited to maximum ${config.prHourlyLimit} per hour, so it doesn't swamp any CI resources or spam the project. See docs for \`prhourlylimit\` for details.\n\n`;
   }
   return prDesc;
 }
diff --git a/test/workers/pr/__snapshots__/index.spec.js.snap b/test/workers/pr/__snapshots__/index.spec.js.snap
index 8885b22f7b..0d6792eaf3 100644
--- a/test/workers/pr/__snapshots__/index.spec.js.snap
+++ b/test/workers/pr/__snapshots__/index.spec.js.snap
@@ -34,7 +34,7 @@ Array [
 |---|---|---|---|
 | [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | pin | \`1.0.0\` -> \`1.1.0\` |
 
-:pushpin: **Important**: Renovate will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset \`:preserveSemverRanges\` your config if you instead don't wish to pin dependencies.
+📌 **Important**: Renovate will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset \`:preserveSemverRanges\` your config if you instead don't wish to pin dependencies.
 
 ---
 
@@ -53,13 +53,13 @@ Array [
 
 ### Renovate configuration
 
-:date: **Schedule**: \\"before 5am\\" in timezone some timezone.
+📅 **Schedule**: \\"before 5am\\" in timezone some timezone.
 
-:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
+🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
 
-:recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with \\"\`rebase!\`\\".
+♻️ **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with \\"\`rebase!\`\\".
 
-:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.
+🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
 
 ---
 
@@ -100,13 +100,13 @@ Array [
 
 ### Renovate configuration
 
-:date: **Schedule**: \\"before 5am\\" (UTC).
+📅 **Schedule**: \\"before 5am\\" (UTC).
 
-:vertical_traffic_light: **Automerge**: Enabled.
+🚦 **Automerge**: Enabled.
 
-:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
+♻️ **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
 
-:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.
+🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
 
 ---
 
@@ -138,9 +138,9 @@ note 1
 
 note 2
 
-:abcd: If you wish to disable git hash updates, add \`\\":disableDigestUpdates\\"\` to the extends array in your config.
+🔡 If you wish to disable git hash updates, add \`\\":disableDigestUpdates\\"\` to the extends array in your config.
 
-:wrench: This Pull Request updates lock files to use the latest dependency versions.
+🔧 This Pull Request updates lock files to use the latest dependency versions.
 
 ---
 
@@ -164,13 +164,13 @@ note 2
 
 ### Renovate configuration
 
-:date: **Schedule**: At any time (no schedule defined).
+📅 **Schedule**: At any time (no schedule defined).
 
-:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
+🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
 
-:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
+♻️ **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
 
-:ghost: **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/config-help/issues) if that's undesired.
+👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/config-help/issues) if that's undesired.
 
 ---
 
@@ -211,13 +211,13 @@ Array [
 
 ### Renovate configuration
 
-:date: **Schedule**: At any time (no schedule defined).
+📅 **Schedule**: At any time (no schedule defined).
 
-:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
+🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
 
-:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
+♻️ **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
 
-:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.
+🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
 
 ---
 
@@ -256,13 +256,13 @@ Object {
 
 ### Renovate configuration
 
-:date: **Schedule**: \\"before 5am\\" (UTC).
+📅 **Schedule**: \\"before 5am\\" (UTC).
 
-:vertical_traffic_light: **Automerge**: Enabled.
+🚦 **Automerge**: Enabled.
 
-:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
+♻️ **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
 
-:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.
+🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
 
 ---
 
@@ -298,13 +298,13 @@ Object {
 
 ### Renovate configuration
 
-:date: **Schedule**: \\"before 5am\\" (UTC).
+📅 **Schedule**: \\"before 5am\\" (UTC).
 
-:vertical_traffic_light: **Automerge**: Enabled.
+🚦 **Automerge**: Enabled.
 
-:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
+♻️ **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with \\"\`rebase!\`\\".
 
-:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.
+🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
 
 ---
 
diff --git a/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.js.snap b/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.js.snap
index c36da47699..6ebf8cda03 100644
--- a/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.js.snap
+++ b/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.js.snap
@@ -9,7 +9,7 @@ Based on the default config's presets, Renovate will:
   - Start dependency updates only once this Configure Renovate PR is merged
   - Run Renovate on following schedule: before 5am
 
-:abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
+🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
 
 ---
 "
@@ -26,7 +26,7 @@ Based on the default config's presets, Renovate will:
   - description two
   - something else
 
-:abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
+🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
 
 ---
 "
@@ -44,7 +44,7 @@ Based on the default config's presets, Renovate will:
   - something else
   - this is Docker-only
 
-:abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
+🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
 
 ---
 "
diff --git a/test/workers/repository/onboarding/pr/__snapshots__/errors-warnings.spec.js.snap b/test/workers/repository/onboarding/pr/__snapshots__/errors-warnings.spec.js.snap
index 7ad90ac61b..ba787dda8c 100644
--- a/test/workers/repository/onboarding/pr/__snapshots__/errors-warnings.spec.js.snap
+++ b/test/workers/repository/onboarding/pr/__snapshots__/errors-warnings.spec.js.snap
@@ -4,7 +4,7 @@ exports[`workers/repository/onboarding/pr/errors-warnings getDepWarnings() retur
 "
 ---
 
-### :warning: Dependency Lookup Warnings :warning:
+### ⚠️ Dependency Lookup Warnings ⚠️
 
 Please correct - or verify that you can safely ignore - these lookup failures before you merge this PR.
 
diff --git a/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap b/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap
index 9b558af3c2..e03ee9b100 100644
--- a/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap
+++ b/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap
@@ -36,7 +36,7 @@ With your current configuration, Renovate will create 2 Pull Requests:
 
 <br />
 
-:children_crossing: Branch creation will be limited to maximum 1 per hour, so it doesn't swamp any CI resources or spam the project. See docs for \`prhourlylimit\` for details.
+🚸 Branch creation will be limited to maximum 1 per hour, so it doesn't swamp any CI resources or spam the project. See docs for \`prhourlylimit\` for details.
 
 "
 `;
-- 
GitLab