aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/link-readme.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/link-readme.ts')
-rw-r--r--scripts/link-readme.ts6
1 files changed, 3 insertions, 3 deletions
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