Go to file
xinxin22 d1a248de9f Update Issue.py 2025-07-12 23:51:42 +08:00
.devops refactor: .devops/实验一.yml 2025-06-20 11:14:56 +08:00
.idea 修改 2025-06-19 11:14:28 +08:00
doc init 2024-04-10 14:32:49 +08:00
docs 修改 2025-06-19 11:14:28 +08:00
extras/obfastapi 修改 2025-06-19 11:14:28 +08:00
issue_sync Update issue_gitlink_to_gitee.py 2025-07-11 11:34:16 +08:00
logs Add logs/sync.log 2024-04-10 14:43:09 +08:00
node_modules 修改 2025-06-19 11:14:28 +08:00
pr_sync Update pr_gitlink_to_gitee.py 2025-07-10 08:46:06 +08:00
script init 2024-04-10 14:32:49 +08:00
sql 修改 2025-06-19 11:14:28 +08:00
src Update Issue.py 2025-07-12 23:51:42 +08:00
sync 修改 2025-06-19 11:14:28 +08:00
tools 修改 2025-06-19 11:14:28 +08:00
web 修改 2025-06-19 11:14:28 +08:00
.gitignore Update .gitignore 2024-04-10 14:38:55 +08:00
API.md clone时取消指定分支 & 添加强制同步 2024-05-10 15:09:50 +08:00
Dockerfile Update Dockerfile 2025-07-12 10:37:33 +08:00
Documentation.md Update Documentation.md 2024-04-10 17:40:44 +08:00
LICENSE init 2024-04-10 14:32:49 +08:00
LOG_ENHANCEMENT_CHANGES.md 修改 2025-06-19 11:14:28 +08:00
Makefile init 2024-04-10 14:32:49 +08:00
README-CN.md init 2024-04-10 14:32:49 +08:00
README.md init 2024-04-10 14:32:49 +08:00
boot init 2024-04-10 14:32:49 +08:00
env.ini 修改 2025-06-19 11:14:28 +08:00
env.ini.example init 2024-04-10 14:32:49 +08:00
main.py pr 2025-07-07 11:29:37 +08:00
package-lock.json 修改 2025-06-19 11:14:28 +08:00
requirement.txt 修改 2025-06-19 11:14:28 +08:00
sync.py init 2024-04-10 14:32:49 +08:00
test_api_call.py pr 2025-07-07 11:29:37 +08:00
test_db_connection.py 修改 2025-06-19 11:14:28 +08:00
test_routes.py pr 2025-07-07 11:29:37 +08:00
verify_sync.py pr 2025-07-07 11:29:37 +08:00
yarn.lock 修改 2025-06-19 11:14:28 +08:00

README.md

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

backend

requirement

name version necessity
python 3.9 True
uvicorn 0.14.0 True
SQLAlchemy 1.4.21 True
fastapi 0.66.0 True
aiohttp 3.7.4 True
pydantic 1.8.2 True
starlette 0.14.2 True
aiomysql 0.0.21 True
requests 2.25.1 True
loguru 0.6.0 True
typing-extensions 4.1.1 True
aiofiles 0.8.0 True

how to install

[!NOTE] Run the code in python 3.9

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

  1. Config your database
  • Run the table.sql script in sql folder
  • Config the database connection string in src/base/config.py
  1. Config your repo address, branch, (todo token) by website
  1. DIY yourself sync script (Refer the two example in sync folder) and run the sync script under a cronjob you should consider:
  • http address or ssh address (how to add your ssh key)
  • rebase logic or diff logic
  • which cronjob (maybe the k8s cronjob or linux system crontab)