[GH-ISSUE #22] Bug: github-mirror seems to ignore preserve org structure settings #8

Closed
opened 2026-02-27 15:54:30 +03:00 by kerem · 14 comments
Owner

Originally created by @kolaente on GitHub (Jun 3, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/22

I've just discovered this and it's just what I need. And so pretty!

Now, consider a setting like this:

Image

I would expect all repos being created in the github-mirrors and github-stars organizations. However, all repos seem to be created under my username, even though I have the Preserve Org Structure checkbox unchecked.

Is this a bug? Or do I need to configure something else?

Originally created by @kolaente on GitHub (Jun 3, 2025). Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/22 I've just discovered this and it's just what I need. And so pretty! Now, consider a setting like this: ![Image](https://github.com/user-attachments/assets/a6518c4d-580b-4942-9579-86366d554437) I would expect all repos being created in the `github-mirrors` and `github-stars` organizations. However, all repos seem to be created under my username, even though I have the `Preserve Org Structure` checkbox unchecked. Is this a bug? Or do I need to configure something else?
kerem 2026-02-27 15:54:30 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@arunavo4 commented on GitHub (Jun 4, 2025):

Hi @kolaente

The “Preserve Org Structure” switch can feel backwards the first time you see it, so here’s the quick version:

Goal Setting
Put everything in one bucket called github-mirrors Set Default Organization = github-mirrors
Send your starred repos to github-stars Already configured—nice one 👍
Keep GitHub organization repos under their original org names in Gitea Turn ON “Preserve Org Structure”

How it actually behaves

  • Toggle OFF → every repo (personal and org) lands under your own Gitea account (konrad).
  • Toggle ON → org repos stay in their matching org; everything else follows the defaults above.

Hover the info-icon next to the checkbox for the same explanation in-app.

If you need finer routing rules (e.g., certain orgs → different buckets), let me know—we can chat about adding that as a feature.

Hope that clears things up!

<!-- gh-comment-id:2939923042 --> @arunavo4 commented on GitHub (Jun 4, 2025): Hi @kolaente The “Preserve Org Structure” switch can feel backwards the first time you see it, so here’s the quick version: | Goal | Setting | | --- | --- | | Put **everything** in one bucket called **`github-mirrors`** | Set **Default Organization** = `github-mirrors` | | Send your **starred** repos to **`github-stars`** | Already configured—nice one 👍 | | Keep GitHub organization repos under their *original* org names in Gitea | **Turn ON “Preserve Org Structure”** | ### How it actually behaves * **Toggle OFF** → every repo (personal **and** org) lands under your own Gitea account (`konrad`). * **Toggle ON** → org repos stay in their matching org; everything else follows the defaults above. Hover the info-icon next to the checkbox for the same explanation in-app. If you need finer routing rules (e.g., certain orgs → different buckets), let me know—we can chat about adding that as a feature. Hope that clears things up!
Author
Owner

@arunavo4 commented on GitHub (Jun 4, 2025):

I will work on the UX of this Config page I think its confusing, it needs to be simplified.

<!-- gh-comment-id:2940080005 --> @arunavo4 commented on GitHub (Jun 4, 2025): I will work on the UX of this Config page I think its confusing, it needs to be simplified.
Author
Owner

@neo-pan commented on GitHub (Jun 4, 2025):

Nice work @arunavo4! Quick question — is it possible to keep the org structure for my own repos, but send all starred ones to github-stars only? Keeping the full structure for stars creates too many orgs in Gitea.

Thanks!

<!-- gh-comment-id:2941101337 --> @neo-pan commented on GitHub (Jun 4, 2025): Nice work @arunavo4! Quick question — is it possible to keep the org structure for my own repos, but send all starred ones to github-stars only? Keeping the full structure for stars creates too many orgs in Gitea. Thanks!
Author
Owner

@arunavo4 commented on GitHub (Jun 4, 2025):

@neo-pan You can definitely do this! Enable "Preserve Org Structure" in GitHub settings to maintain organization structure for your own repos, and then set a custom name like "github-stars" in the "Starred Repositories Organization" field in Gitea settings. This way, your own repos keep their structure while all starred repos go to a single organization.

<!-- gh-comment-id:2941177405 --> @arunavo4 commented on GitHub (Jun 4, 2025): @neo-pan You can definitely do this! Enable "Preserve Org Structure" in GitHub settings to maintain organization structure for your own repos, and then set a custom name like "github-stars" in the "Starred Repositories Organization" field in Gitea settings. This way, your own repos keep their structure while all starred repos go to a single organization.
Author
Owner

@kolaente commented on GitHub (Jun 5, 2025):

Thanks for the explanation!

Does that mean when I want all starred repos to go to github-stars and everything else I still need to check the checkbox?

Right now, I would expect this:

  • Having the Preserve Org Structure toggle on: all repos go into an org with the matching name, regardless of what is configured on the right for Default Org or Starred Org
  • Having the Preserve Org Structure toggle off:
    • If something is configured for Default Org or Starred Org, all repos go there
    • If nothing is configured for Default Org or Starred Org, all repos go under my own account

This does not seem to be the case though?

<!-- gh-comment-id:2944532545 --> @kolaente commented on GitHub (Jun 5, 2025): Thanks for the explanation! Does that mean when I want all starred repos to go to `github-stars` and everything else I still need to check the checkbox? Right now, I would expect this: - Having the `Preserve Org Structure` toggle **on**: all repos go into an org with the matching name, regardless of what is configured on the right for `Default Org` or `Starred Org` - Having the `Preserve Org Structure` toggle **off**: - If something is configured for `Default Org` or `Starred Org`, all repos go there - If nothing is configured for `Default Org` or `Starred Org`, all repos go under my own account This does not seem to be the case though?
Author
Owner

@arunavo4 commented on GitHub (Jun 5, 2025):

@kolaente
You're right about the expected behavior, but there might be some confusion in how the settings interact.

Here's how it works:

  1. With "Preserve Org Structure" ON: Your own repos and org repos maintain their original structure in Gitea.
  2. With "Preserve Org Structure" OFF: All repos (except starred) go to either your username or the Default Org if specified.
  3. Starred repos follow the "Starred Repositories Organization" setting REGARDLESS of the "Preserve Org Structure" toggle. This is a separate setting specifically for starred repos.

If you're not seeing this behavior, it might be a bug. Could you share what behavior you're experiencing instead? That would help us troubleshoot.

<!-- gh-comment-id:2945521022 --> @arunavo4 commented on GitHub (Jun 5, 2025): @kolaente You're right about the expected behavior, but there might be some confusion in how the settings interact. Here's how it works: 1. With "Preserve Org Structure" ON: Your own repos and org repos maintain their original structure in Gitea. 2. With "Preserve Org Structure" OFF: All repos (except starred) go to either your username or the Default Org if specified. 3. Starred repos follow the "Starred Repositories Organization" setting REGARDLESS of the "Preserve Org Structure" toggle. This is a separate setting specifically for starred repos. If you're not seeing this behavior, it might be a bug. Could you share what behavior you're experiencing instead? That would help us troubleshoot.
Author
Owner

@arunavo4 commented on GitHub (Jun 5, 2025):

I need to work on making the configuration page less confusing. will do it this weekend. If you have ideas for better UX consider droping them here.

<!-- gh-comment-id:2945527829 --> @arunavo4 commented on GitHub (Jun 5, 2025): I need to work on making the configuration page less confusing. will do it this weekend. If you have ideas for better UX consider droping them here.
Author
Owner

@kolaente commented on GitHub (Jun 11, 2025):

I've mirrored a starred repo, and it got mirrored to my account, not in the starred repo org. One of my repos on my personal github account got mirrored to my gitea personal account as well instead of the org I specified.

It seems like the settings are ignored?

Here are my settings:

Image

<!-- gh-comment-id:2962695496 --> @kolaente commented on GitHub (Jun 11, 2025): I've mirrored a starred repo, and it got mirrored to my account, not in the starred repo org. One of my repos on my personal github account got mirrored to my gitea personal account as well instead of the org I specified. It seems like the settings are ignored? Here are my settings: ![Image](https://github.com/user-attachments/assets/763b3a21-3410-4f64-bebf-9601b1eab477)
Author
Owner

@arunavo4 commented on GitHub (Jun 15, 2025):

Hi @kolaente I have been busy but I have made a new release feel free to test it out. I will be testing t this week and if tehre are any bugs feel free to report it.

<!-- gh-comment-id:2974626659 --> @arunavo4 commented on GitHub (Jun 15, 2025): Hi @kolaente I have been busy but I have made a new release feel free to test it out. I will be testing t this week and if tehre are any bugs feel free to report it.
Author
Owner

@kolaente commented on GitHub (Jun 16, 2025):

I've checked the changes and they do a much better job explaining what happens. Thank you for that!

However, it seems like the behaviour is still the same as I've described in my last comment here.

Here's my config:

Image

<!-- gh-comment-id:2978218633 --> @kolaente commented on GitHub (Jun 16, 2025): I've checked the changes and they do a much better job explaining what happens. Thank you for that! However, it seems like the behaviour is still the same as I've described in my last comment here. Here's my config: ![Image](https://github.com/user-attachments/assets/8120b966-12a0-4617-a915-d1dfe9d3996b)
Author
Owner

@arunavo4 commented on GitHub (Jun 17, 2025):

@kolaente Thanks I am still testing all the options will find some time this week to get this fixed.

<!-- gh-comment-id:2978787888 --> @arunavo4 commented on GitHub (Jun 17, 2025): @kolaente Thanks I am still testing all the options will find some time this week to get this fixed.
Author
Owner

@arunavo4 commented on GitHub (Jun 17, 2025):

@kolaente I finally got time to test the options properly. I have tested the single org option its fixed now in the latest release v2.16.2 Thanks for testing the application and finding the issues. Closing this issue for now but feel free to open it if you get any issues regarding this.

<!-- gh-comment-id:2980093130 --> @arunavo4 commented on GitHub (Jun 17, 2025): @kolaente I finally got time to test the options properly. I have tested the single org option its fixed now in the latest release `v2.16.2` Thanks for testing the application and finding the issues. Closing this issue for now but feel free to open it if you get any issues regarding this.
Author
Owner

@kolaente commented on GitHub (Jun 17, 2025):

Thanks! I can confirm everything works as expected now.

<!-- gh-comment-id:2980179133 --> @kolaente commented on GitHub (Jun 17, 2025): Thanks! I can confirm everything works as expected now.
Author
Owner

@arunavo4 commented on GitHub (Jun 17, 2025):

Awesome thanks for your patience @kolaente . Hope the new UI helps to make things clear.

<!-- gh-comment-id:2980189358 --> @arunavo4 commented on GitHub (Jun 17, 2025): Awesome thanks for your patience @kolaente . Hope the new UI helps to make things clear.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gitea-mirror#8
No description provided.