Federated user and repo migrations #9
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A commonly-requested feature for AP software is to be able to easily switch instances. Although user migrations are not in the AP spec, we can reuse Mastodon's approach of using a
Move
activity along with settingalsoKnownAs
on the target and original actors.See forgefed@codeberg.org/forgefed#149 for more details. We will also need to submit a PR to ForgeFed documenting this usage of
Move
.For repository migrations, we can reuse the existing code and also send out the
Move
activity and setalsoKnownAs
on both actors. We also have to copy over the stars and list of forks. Gitea instances should have a background job to periodically fetch the actors for remote repos, and update them if a migration occurred.For user migrations, we can now use the repository migration code. Simply go through every repo that the user owns, and migrate it using the process above. The background job should also periodically fetch the actors of remote users and update them as needed. Organization migrations work the exact same as user migrations.
As usual, for both user and repository migrations, Gitea should redirect you to the new location when you try to access the old location.
Also, we need to have a configurable cooldown period in which a username cannot be claimed. One week should be long enough for all the other instances in federation to detect and process a migration.
Federated user and repomigrationsto Federated user and repo migrations