GitHub2Forgejo icon indicating copy to clipboard operation
GitHub2Forgejo copied to clipboard

Feature Request: Syncing Organisation Repositories

Open sigmasternchen opened this issue 1 year ago • 3 comments

Hi there,

First of all: This tool is amazing! Thank you for building it.

I was wonder if it would be possible to also add the capability to mirror repositories of organisations that the Github user is member of. I'm envisioning something like a comma-separated list of organisations to sync, and then either a list of target organisations on Forgejo, or an option to create them under the user using a naming scheme like "{organisation}_{repo}" or something like that.

Thank you again! - Sigma

sigmasternchen avatar Dec 17 '24 14:12 sigmasternchen

That's a great idea, but since I cannot code anything meaningful for ~6 months I'll have to delay the implementation of this request.

I'll add it to my TODO list I'm going to shave off, though!

RGBCube avatar Dec 17 '24 19:12 RGBCube

I totally understand. I'd offer to help, but I have no idea about nushell scripting. ^^"

Anyway: Thank you for considering implementing it!

sigmasternchen avatar Dec 17 '24 19:12 sigmasternchen

Hmm, I thought you needed to query /orgs/{name}/repos to get organization repositories but seems like /users works just fine:

Image

So the script should work without modification. You can just specify GITHUB_USER and FORGEJO_USER to be a organization. And it should work as long as your Forgejo token has permissions to migrate repositories to that organization.

Forgejo doesn't specify "user" or "org" in its migrate API either, so it should hopefully work.

Could you test this for me? I don't want to close before making sure it works.

RGBCube avatar May 06 '25 13:05 RGBCube

I was just able to use this script to migrate an organization, just by specifying the organization name as the github/forgejo username :+1:

hufman avatar Aug 31 '25 18:08 hufman

Very nice! That's enough to close this issue then

RGBCube avatar Aug 31 '25 18:08 RGBCube