From 264b75cd68cdeaa43be5bb88fda76e4376658323 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 6 Dec 2025 09:43:02 +0200 Subject: [PATCH] chore(regroup): clean up migration scripts --- scripts/repo-migration/README.md | 13 +++++++++++++ scripts/{ => repo-migration}/migrate-releases.js | 0 .../repo-migration/migrated-discussions.txt | 0 scripts/{ => repo-migration}/migrated-issues.txt | 0 scripts/{ => repo-migration}/port-discussions.ts | 0 scripts/{ => repo-migration}/port-issues.ts | 0 6 files changed, 13 insertions(+) create mode 100644 scripts/repo-migration/README.md rename scripts/{ => repo-migration}/migrate-releases.js (100%) rename port-discussions.log => scripts/repo-migration/migrated-discussions.txt (100%) rename scripts/{ => repo-migration}/migrated-issues.txt (100%) rename scripts/{ => repo-migration}/port-discussions.ts (100%) rename scripts/{ => repo-migration}/port-issues.ts (100%) diff --git a/scripts/repo-migration/README.md b/scripts/repo-migration/README.md new file mode 100644 index 000000000..3266b69dd --- /dev/null +++ b/scripts/repo-migration/README.md @@ -0,0 +1,13 @@ +# Repo migration scripts + +> [!NOTE] +> These scripts were designed to be single use only, since they took care of migrating between repos. As such, they are not actively maintained and are to be used for reference only. + +These scripts were used in the process of migrating from the forked [Notes](https://github.com/TriliumNext/Notes) repo to the original [Trilium](https://github.com/TriliumNext/Trilium) repo. +Since Git only migrates the code and not the GitHub-specific data, we had to create scripts that handle the migration of: + +* Issues, using the "Transfer" function for each issue (via `gh cli`). + * The migration logs are available in `migrated-issues.txt`. +* Discussions, which transferred each discussion from the original repo. This one is a bit more complicated (and potentially flaky) since it works via playwright, by manually selecting the "Transfer" function (no API available at the time). + * The migration logs are available in`migrated-discussions.txt`. +* Releases, by manually downloading the assets from the source repo and creating new releases into the destination repo. \ No newline at end of file diff --git a/scripts/migrate-releases.js b/scripts/repo-migration/migrate-releases.js similarity index 100% rename from scripts/migrate-releases.js rename to scripts/repo-migration/migrate-releases.js diff --git a/port-discussions.log b/scripts/repo-migration/migrated-discussions.txt similarity index 100% rename from port-discussions.log rename to scripts/repo-migration/migrated-discussions.txt diff --git a/scripts/migrated-issues.txt b/scripts/repo-migration/migrated-issues.txt similarity index 100% rename from scripts/migrated-issues.txt rename to scripts/repo-migration/migrated-issues.txt diff --git a/scripts/port-discussions.ts b/scripts/repo-migration/port-discussions.ts similarity index 100% rename from scripts/port-discussions.ts rename to scripts/repo-migration/port-discussions.ts diff --git a/scripts/port-issues.ts b/scripts/repo-migration/port-issues.ts similarity index 100% rename from scripts/port-issues.ts rename to scripts/repo-migration/port-issues.ts