Coder Social home page Coder Social logo

gh2gt's Introduction

GitHub to Gitea Mirror

BCH compliance

gh2gt (GitHub to Gitea) is a simple tool that mirrors your own repositories and starred repositories to Gitea.

Installation

  • Install depencies with pip install -r requirements.txt
  • Fill the src/secrets.py file
  • If you want to ignore a repo add it to src/settings.py
  • Run the python script py main.py

Features

  • Migrates your own repos to Gitea
  • Migrates your starred repos to Gitea
  • Ignore repos as you like

Gitea Configuration

You might want to change your Gitea configuration if you have more than 50 starred or own repositories. Because Gitea's default configuration only lists 50 items for each request. To do that:

  • Open gitea/conf/app.ini
  • Add [api] header (I don't know if it is necessary)
  • Below the header add MAX_RESPONSE_ITEMS varibale and the number you desire as value. Example: MAX_RESPONSE_ITEMS=100

app.ini should look like this

...

[api]
MAX_RESPONSE_ITEMS=100

...

You can find more information at official documentation.

ToDo

  • Ease the code
  • Shorten the code
  • Add tests
  • Add Docker support
  • Add crontab support
  • Remove GitHubPy dependency and make requests with requests package
  • Make migration process two sided (sync between github and gitea)
  • Add an option to mirroring process (like: do you want to mirror your own repos?)
  • Take command-line arguments

MightDo

  • Intractive mode (wait user input for every repo)

Sources

https://pygithub.readthedocs.io/en/latest/introduction.html

https://jpmens.net/2019/04/15/i-mirror-my-github-repositories-to-gitea/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.