Developing database migration plan for issue reference comments

I’m starting to add a database migration for Gitea #3695 and would like some direction from the maintainers.

The current code creates reference comments from commit messages by storing the literal HTML code for the link that gets displayed. These links are not updated if the repo has a name change or a transfer of ownership. During the migration process, any of these invalid links will not resolve to a repo ID (needed for the new method of referencing) and so they will be removed entirely.

Another migration approach would possibly drop all existing reference comments and retroactively generate the new ones. This would connect up any cross-referencing that already exists in comments and commits in the repos and result in a better user experience. This approach would only introduce reference comments, and not open/close issues.

Any thoughts on what kind of migration process the project would like to see?

1 Like