[feature request] Add Push Mirrors
Currently the repositories are mirrored as pull mirrors. I want them to be added as push mirrors (too).
The relevant endpoint in the Forgejo API is /repos/{owner}/{repo}/push_mirrors.
Since mirroring using SSH requires manually adding the SSH public key of each repository from Forgejo to GitHub, I think it's okay to just use the HTTP(S) URLs instead.
Not sure if this is related, but I notice that repository description and topics are not migrated either.
Here's a repo I migrated manually (through Forgejo web UI):
- Forgejo:
- GitHub:
Here's one done through the script:
-
Forgejo:
-
GitHub:
The icon (notice the top-left corner of Forgejo screenshots) is also different, and the mirrors created by the tool say that it's a mirror (under the repo name). Maybe what I want is out of scope for this tool? Let me know if that is the case and I will close the issue. Thanks.
Can you show me the exact UI that created that manual mirror?
Also I'm not sure if Forgejo actually lets you create bidirectional mirrors, if it does, then it should be in scope.
Regarding descriptions: That's actually interesting, I should add that + tag + etc mirroring too with a flag.
I'll get to these when I have the time.
Apologies, I misremembered. For the nix-dotfiles repo I migrated the repo without setting up a pull mirror. Then just added the push mirror from the UI.
I just created a test repo on GitHub to try something, and it seems that bidirectional mirrors are indeed not possible. I can add a push mirror after adding a pull mirror (the reverse cannot be done), but even then the Forgejo instance will not have PRs.
I guess if I want to migrate repos as push mirrors, my best bet is to create a separate tool that does that?
I basically want to move activities away from GitHub (as much as feasible) and mainly keep it as a public mirror of my Forgejo instance, as backup and for sharing links.