aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLibravatar Aditya Mangalampalli <aditya.mangalampalli@gmail.com>2022-04-15 02:00:25 -0700
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-16 21:57:57 +0530
commit210131ca184c3aa043371857c022aa1aa149efbf (patch)
tree6bc4e10a1540e55a66146c099bc468a12287425e /scripts
parentUpdate submodule url to ferdium-recipes (#1) (diff)
downloadferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.tar.gz
ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.tar.zst
ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.zip
Matched casing for almost all replacements
Diffstat (limited to 'scripts')
-rw-r--r--scripts/add-crowdin-contributors.ts2
-rw-r--r--scripts/link-readme.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/add-crowdin-contributors.ts b/scripts/add-crowdin-contributors.ts
index 21366aa82..7c1a364cb 100644
--- a/scripts/add-crowdin-contributors.ts
+++ b/scripts/add-crowdin-contributors.ts
@@ -11,7 +11,7 @@ import allContributors from 'all-contributors-cli';
11 * and paste its output into this script. 11 * and paste its output into this script.
12 * 12 *
13 * Usage: 13 * Usage:
14 * 1. Open https://crowdin.com/project/getferdi/settings#members 14 * 1. Open https://crowdin.com/project/ferdium/settings#members
15 * 2. Open the console and execute the script below: 15 * 2. Open the console and execute the script below:
16 16
17const members = []; 17const members = [];
diff --git a/scripts/link-readme.ts b/scripts/link-readme.ts
index 77b384ff4..bf1e9fcb6 100644
--- a/scripts/link-readme.ts
+++ b/scripts/link-readme.ts
@@ -1,7 +1,7 @@
1/** 1/**
2 * Script that automatically creates links to issues and users inside README.md 2 * Script that automatically creates links to issues and users inside README.md
3 * 3 *
4 * e.g. "#123" => "[#123](https://github.com/getferdi/ferdi/issues/123)" 4 * e.g. "#123" => "[#123](https://github.com/ferdium/ferdium-app/issues/123)"
5 * and "franz/#123" => "[franz#123](https://github.com/meetfranz/franz/issues/123)" 5 * and "franz/#123" => "[franz#123](https://github.com/meetfranz/franz/issues/123)"
6 * and "@abc" => "[@abc](https://github.com/abc)" 6 * and "@abc" => "[@abc](https://github.com/abc)"
7 */ 7 */
@@ -38,14 +38,14 @@ readme = readme.replace(/(?<!\[)\w+\/\w+#\d+(?![\d\]])/gi, match => {
38 return `[${repo}#${issueNr}](https://github.com/${repo}/issues/${issueNr})`; 38 return `[${repo}#${issueNr}](https://github.com/${repo}/issues/${issueNr})`;
39}); 39});
40 40
41// Replace Ferdi issues 41// Replace Ferdium issues
42// Regex matches strings that don't begin with a "[", i.e. are not already linked and 42// Regex matches strings that don't begin with a "[", i.e. are not already linked and
43// don't begin with "franz", i.e. are not Franz issues, followed by a "#" and digits to indicate 43// don't begin with "franz", i.e. are not Franz issues, followed by a "#" and digits to indicate
44// a GitHub issue, and not ending with a "]" 44// a GitHub issue, and not ending with a "]"
45readme = readme.replace(/(?<!\[|franz)#\d+(?![\d\]])/gi, match => { 45readme = readme.replace(/(?<!\[|franz)#\d+(?![\d\]])/gi, match => {
46 const issueNr = match.replace('#', ''); 46 const issueNr = match.replace('#', '');
47 replacements += 1; 47 replacements += 1;
48 return `[#${issueNr}](https://github.com/getferdi/ferdi/issues/${issueNr})`; 48 return `[#${issueNr}](https://github.com/ferdium/ferdium-app/issues/${issueNr})`;
49}); 49});
50 50
51// Link GitHub users 51// Link GitHub users