Open Brycey92 opened 8 months ago
Hi @Brycey92!
I agree, it would be awesome if the script could achieve mirrors with issues, PRs, etc.
I've seen that you forked this repository and created a few branches. Are you actively working on this feature and are you planning on providing a PR?
Hi!
I've started work on this feature, but it looks like Gitea itself doesn't support scheduled pull mirroring at the same time as importing/mirroring labels, issues, PRs, releases, or milestones. I can, however, add scheduled mirroring of LFS data, and I can check the box for wikis, but Gitea doesn't make it clear whether that's a one-time import of the wiki or a scheduled mirror. More testing for this is required.
The best alternative I've come up with so far is to add an option to the script like --metadata
which creates Gitea orgs like ${gittea_organization}_metadata
. These orgs would have pull mirroring disabled, but would have the aforementioned metadata (and wikis?) imported. Being separate orgs allows them to be wiped and re-imported periodically with the two scripts in this repo, without affecting existing pull mirrored orgs and repos. I may want to make the script smart enough to create ..._metadata2
orgs, then import, then delete only those ..._metadata
orgs that were imported successfully, then rename ..._metadata2
orgs to remove the 2
.
I have a set of untested changes in feature/metadata
that implements the first half of this, but before testing and finishing that, I'm currently trying to get --mode user
to accept arbitrary users to --user
. Presently, the script just mirrors the authenticated user's repos no matter what the value of --user
is.
The best alternative I've come up with so far is to add an option to the script like
--metadata
which creates Gitea orgs like${gittea_organization}_metadata
. These orgs would have pull mirroring disabled, but would have the aforementioned metadata (and wikis?) imported. Being separate orgs allows them to be wiped and re-imported periodically with the two scripts in this repo, without affecting existing pull mirrored orgs and repos. I may want to make the script smart enough to create..._metadata2
orgs, then import, then delete only those..._metadata
orgs that were imported successfully, then rename..._metadata2
orgs to remove the2
.
That sounds like a nice workaround for me. I think we need so much further code for this that it probably makes sense to create another script just for the metadata mirroring.
I have a set of untested changes in
feature/metadata
that implements the first half of this, but before testing and finishing that, I'm currently trying to get--mode user
to accept arbitrary users to--user
. Presently, the script just mirrors the authenticated user's repos no matter what the value of--user
is.
You are correct. I've added a few comments to your PR.
Large amounts of critical information can be stored in repositories' issues, PRs, and wiki pages. From what I've heard, Forgejo and Gitea can mirror these if one uses their importers on single repositories at a time.
It would be phenomenal if this script could trigger Forgejo/Gitea to mirror these, or if it could achieve mirrors of these in any other way.