Bonjour,
Gitea migrations can get projects from other Gitea instances or GitLab, GitHub, etc. It cannot however migrate them back to another forge. It would be useful, for instance, to be able to migrate a single issue to another forge and update it as it changes (i.e. mirror it), for the purpose of federation.
Since the Gitea internal file format is being documented to be re-used by other forges, it could also be used to develop a forgefriends package whose purpose would be to download and upload software projects from and to any forge, re-using this file format.
Since there currently is no uploader within Gitea, this package could be bootstrapped to provide only that feature, based on the Gitea internal file format. It could become a dependency of Gitea and gradually integrate more and more of the code currently in charge of migrations.
The alternative would be to propose a new feature within Gitea to implement migrations uploads. However, this is only really useful in the context of federation. The other scenario is to migrate a project from Gitea to another Gitea instance but one could argue that it can be implemented by instructing one instance to pull from the other: there is no need to push. Yet another scenario is to migrate a project from Gitea to a forge that does not know (or want) to pull from other forges (such as GitHub) but one could argue that there is not much incentive in helping projects to move to such forges.
To summarize, I do not see how such a feature (idempotent forge upload) currently fits in Gitea. At least not until it starts implementing federation.
Thoughts?