ob-repository-synchronize is a small tool which can help engineer to master their open source production’s code synchronization between GitHub, Gitee, CodeChina, internal repository and so on.
Principle
Base on git rebase
Base on git diff
New Wiki Synchronization Feature
Now the system supports synchronizing wiki content between repositories. The wiki sync feature can synchronize wiki pages from one repository to another, supporting platforms like Gitee and Gitlink. The system automatically handles differences between platforms, such as URL-encoded Chinese filenames in Gitlink.
Wiki Sync API
The system provides a dedicated API endpoint for synchronizing Wiki content:
Endpoint: /cerobot/sync/{repo_name}/wiki
Method: POST
Parameters:
repo_name: Repository name (path parameter)
The system automatically uses the synchronization direction configured in the database and the default master branch of the wiki repository.
For more details, please refer to the API.md documentation.
docker run -p 8000:8000 -d XXX bash start.sh -s backend
How to use it
Config your database
Run the table.sql script in sql folder
Config the database connection string in src/base/config.py
Start the FastAPI server
python3 main.py
The server will start on http://localhost:8000. You can access the interactive API documentation at http://localhost:8000/docs (Swagger UI) or http://localhost:8000/redoc (ReDoc).
Configure repositories and sync jobs through API
Use the FastAPI endpoints to:
Create and manage repository configurations
Set up sync jobs between different platforms (GitHub, Gitee, GitLab, etc.)
ob-repository-synchronize
Description
ob-repository-synchronize is a small tool which can help engineer to master their open source production’s code synchronization between GitHub, Gitee, CodeChina, internal repository and so on.
Principle
Base on git rebase
Base on git diff
New Wiki Synchronization Feature
Now the system supports synchronizing wiki content between repositories. The wiki sync feature can synchronize wiki pages from one repository to another, supporting platforms like Gitee and Gitlink. The system automatically handles differences between platforms, such as URL-encoded Chinese filenames in Gitlink.
Wiki Sync API
The system provides a dedicated API endpoint for synchronizing Wiki content:
/cerobot/sync/{repo_name}/wiki
POST
repo_name
: Repository name (path parameter)The system automatically uses the synchronization direction configured in the database and the default master branch of the wiki repository.
For more details, please refer to the API.md documentation.
backend
requirement
how to install
pip3 install -r requirement.txt
python3 main.py
run the sync script locally
python3 sync.py
frontend
Refer the web readme
docker
docker pull XXX:latest
docker run -p 8000:8000 -d XXX bash start.sh -s backend
How to use it
The server will start on
http://localhost:8000
. You can access the interactive API documentation athttp://localhost:8000/docs
(Swagger UI) orhttp://localhost:8000/redoc
(ReDoc).Use the FastAPI endpoints to:
For detailed API documentation, see API.md.
You can also run sync scripts directly:
The project is designed to be extensible. You can add custom synchronization features by:
src/api/
directorysrc/service/
directorysrc/dto/
directoryFor example, you can add issue synchronization, comment synchronization, or other custom features by extending the existing API structure.