vixalien/muzika

Mirror to Codeberg

Closed this issue · 9 comments

Hi, I think it would be worth setting up mirrors to Codeberg so me, and possibly other people using Codeberg don't need to have a GitHub account or have to use GitHub as much, you can view other reasons at: https://codeberg.org/Recommendations/Mirror_to_Codeberg#why-should-we-mirror-to-codeberg

How to set up:
https://codeberg.org/Recommendations/Mirror_to_Codeberg#github-codeberg-mirroring-tutorial

Using GitHub Actions to mirror and Codeberg mirroring allows contributions from both sides.

Examples

BiblioReads

Codeberg: https://codeberg.org/nesaku/BiblioReads
GitHub: https://github.com/nesaku/BiblioReads

Doggo

Codeberg: https://codeberg.org/SOrg/Doggo
GitHub: https://github.com/SillyOrgGH/Doggo

About GitHub Actions, if you are worried about PRs and testing, you can add a PR template and make sure they test it locally. Otherwise, it shouldn't matter as it is just a mirror (that should be contributable), it will likely start building on GitHub once merged &/or commited.

Example: https://codeberg.org/SOrg/Doggo/src/branch/main/.gitea/PULL_REQUEST_TEMPLATE.yml

image

Hi. While I value my privacy and know the issues with GitHub, I simply don't have the time and energy to do this mirroring setup. It is simply because I'm not interested.

If you really hate GitHub, you can probably set up the mirror yourself, and I would possibly do what I can to support that. Except, I don't necessarily want to fiddle with issues that arise from this mirroring thing. Any insights would be appreciated.

Hi. While I value my privacy and know the issues with GitHub, I simply don't have the time and energy to do this mirroring setup. It is simply because I'm not interested.

If you really hate GitHub, you can probably set up the mirror yourself, and I would possibly do what I can to support that. Except, I don't necessarily want to fiddle with issues that arise from this mirroring thing. Any insights would be appreciated.

I don't think many issues will arise from this as the Codeberg and GitHub mirrors would occasionally sync, and would obviously sync when a commit is made. As for not having the time or energy, you would only have to set this up likely once, it isn't that difficult: https://codeberg.org/Recommendations/Mirror_to_Codeberg#option-2-using-github-actions, https://codeberg.org/Recommendations/Mirror_to_Codeberg#step-3-mirror-codeberg-commits-to-github. It wouldn't really be possible to maintain the mirror myself as I would have to keep running commands and pushing, whereas if you do it, it is (for the most part) automated. Codeberg would alert you of new PRs, like GitHub (I assume) does.

Could you please tell me what issues would arise?

Thanks for clarifying, but I'm not that scared of it being a tedious process. What I'm not convinced of is the benefits mirroring to codeberg will have. You are the only contributor who uses that, and honestly you'd be better off running your own mirror and syncing changes automatically as you said it's possible, and an abstraction that creates PRs for you here if you don't want to use GitHub.

I don't really see why this mirroring would be desired at all... You already have a GitHub account. If you don't want to send PRs easily, you can always email me a patch set, and while the process will be slower I will sure take a look at that.

With that said, I'm not convinced at all why I need this, except the "GitHub is bad" argument. I'll go ahead and close this issue but you're free to continue the discussion while the issue is closed.

Thanks for clarifying, but I'm not that scared of it being a tedious process. What I'm not convinced of is the benefits mirroring to codeberg will have. You are the only contributor who uses that, and honestly you'd be better off running your own mirror and syncing changes automatically as you said it's possible, and an abstraction that creates PRs for you here if you don't want to use GitHub.

I don't really see why this mirroring would be desired at all... You already have a GitHub account. If you don't want to send PRs easily, you can always email me a patch set, and while the process will be slower I will sure take a look at that.

With that said, I'm not convinced at all why I need this, except the "GitHub is bad" argument. I'll go ahead and close this issue but you're free to continue the discussion while the issue is closed.

Well obviously, theres the "GitHub is bad" argument (https://codeberg.org/Recommendations/Mirror_to_Codeberg#why-should-we-mirror-to-codeberg if you haven't read yet), but having muzika on Codeberg could also open it up to people who haven't heard of it before. And if you think Codeberg is small, compared to GitHub, yeah, but 92K+ people is more than a lot.

For the syncing changes and PR abstraction, when I said syncing, I was referring to using GitHub Actions in this repo to sync / mirror it to Codeberg, but I can't really do this as I don't have access to this repo or any access tokens for doing this (giving them over would just be risky).

Codeberg could also be used as a backup, just incase anything happens to GitHub or Muzika.

I do not know how that PR abstraction would work and it would probably be insecure &/or hacky.
Emailing a patch set... no thanks, not the kernel way 😆

The way to set it up can take a while (not that long), but it isn't hard:

GitHub Setup:

Access Tokens:

image

You need an access token with the "repo" permission (I don't think you need the workflow one)

GitHub Actions

Without SSH:

View examples here: https://github.com/Tuxilio/sync-test/tree/main/.github/workflows

SSH Only:

Examples:

https://github.com/nesaku/BiblioReads/blob/main/.github/workflows/codeberg-mirror.yml

https://github.com/SillyOrgGH/Doggo/blob/main/.github/workflows/sync-with-codeberg.yml

Codeberg

First, migrate your repo (not moving) or create a new one on Codeberg with no commits

Then, go to settings, down to mirror settings, check Sync when commits are pushed, set a periodic sync (mine is 0s), add this repo's url, then under authorization, add your username and the access token, then add push mirror and click the sync button.

image

image

This took me too long to write :(

But if you don't want to, then that's okay...

Okay, here's what I recommend. You seem very familiar with this, so:

  1. Create a (temporary) fork of muzika
  2. Create a contributable mirror of your fork to Codeberg (making sure to add the actions you're talking about)
  3. Ensure it works
  4. Send a PR showing the exact action I will need and instructions to setup a key
  5. Let me know after I can then create a new mirror on Codeberg and merge your PR

Sounds good enough?

Okay, here's what I recommend. You seem very familiar with this, so:

  1. Create a (temporary) fork of muzika
  2. Create a contributable mirror of your fork to Codeberg (making sure to add the actions you're talking about)
  3. Ensure it works
  4. Send a PR showing the exact action I will need and instructions to setup a key
  5. Let me know after I can then create a new mirror on Codeberg and merge your PR

Sounds good enough?

Yep, will do this tomorrow, have a good night.

@vixalien made a PR: #105

this took a while to write 🥲