Go to file
fangbo f3eb9f5fb6 refactor: .devops/未命名项目.yml 2025-07-17 02:26:12 +08:00
.devops refactor: .devops/未命名项目.yml 2025-07-17 02:26:12 +08:00
__pycache__ gengxin 2025-07-16 10:55:10 +08:00
doc init 2024-04-10 14:32:49 +08:00
extras/obfastapi gengxin 2025-07-16 10:55:10 +08:00
logs 回退到 d82d725d 2025-07-01 08:18:46 +08:00
pr_sync gengxin 2025-07-16 10:55:10 +08:00
script gengxin 2025-07-16 10:55:10 +08:00
scripts gengxin 2025-07-16 10:55:10 +08:00
sql gengxin 2025-07-16 10:55:10 +08:00
src Update config.py 2025-07-17 01:55:55 +08:00
sync 修改 2025-06-20 11:47:04 +08:00
web gengxin 2025-07-16 10:55:10 +08:00
.dockerignore 修改 2025-06-20 11:47:04 +08:00
.gitignore Update .gitignore 2024-04-10 14:38:55 +08:00
API.md clone时取消指定分支 & 添加强制同步 2024-05-10 15:09:50 +08:00
DOCKER_README.md 修改 2025-06-20 11:47:04 +08:00
Dockerfile ADD file via upload 2025-07-17 02:24:42 +08:00
Dockerfile.centos 修改 2025-06-20 11:47:04 +08:00
Documentation.md Update Documentation.md 2024-04-10 17:40:44 +08:00
ENHANCED_ISSUE_SYNC_README.md gengxin 2025-07-16 10:55:10 +08:00
FRONTEND_SETUP.md 回退到 d82d725d 2025-07-01 08:18:46 +08:00
ISSUE_SYNC_README.md 回退到 d82d725d 2025-07-01 08:18:46 +08:00
LICENSE init 2024-04-10 14:32:49 +08:00
LOG_ENHANCEMENT_CHANGES.md 修改 2025-06-20 11:47:04 +08:00
MYSQL_CONNECTOR_FIX.md gengxin 2025-07-16 10:55:10 +08:00
Makefile init 2024-04-10 14:32:49 +08:00
PR_SYNC_USAGE.md gengxin 2025-07-16 10:55:10 +08:00
QUICK_DEPLOY_GUIDE.md gengxin 2025-07-16 10:55:10 +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
Redis-x64-3.0.504.msi 修改 2025-06-20 11:47:04 +08:00
SYNC_VERSION_ROLLBACK.md gengxin 2025-07-16 10:55:10 +08:00
boot init 2024-04-10 14:32:49 +08:00
build-and-deploy.bat gengxin 2025-07-16 10:55:10 +08:00
build-and-deploy.sh gengxin 2025-07-16 10:55:10 +08:00
build.sh 修改 2025-06-20 11:47:04 +08:00
check-container.sh 1 2025-06-30 16:06:44 +08:00
check_container.bat gengxin 2025-07-16 10:55:10 +08:00
check_container.ps1 gengxin 2025-07-16 10:55:10 +08:00
cleanup-docker.sh gengxin 2025-07-16 10:55:10 +08:00
clear_sync_records.py 回退到 d82d725d 2025-07-01 08:18:46 +08:00
deploy-sync-version.bat gengxin 2025-07-16 10:55:10 +08:00
deploy-sync-version.sh gengxin 2025-07-16 10:55:10 +08:00
deploy-with-port-check.bat 1 2025-06-30 16:06:44 +08:00
deploy-with-port-check.sh 1 2025-06-30 16:06:44 +08:00
diagnose-container.bat 1 2025-06-30 16:06:44 +08:00
diagnose-container.ps1 1 2025-06-30 16:06:44 +08:00
diagnose-container.sh 1 2025-06-30 16:06:44 +08:00
diagnose-deployment.sh 回退到 d82d725d 2025-07-01 08:18:46 +08:00
docker-compose.yml 修改 2025-06-20 11:47:04 +08:00
docker_commands.md gengxin 2025-07-16 10:55:10 +08:00
env.ini 22 2025-07-16 21:51:33 +08:00
env.ini.example gengxin 2025-07-16 10:55:10 +08:00
fix-container-issues.sh 1 2025-06-30 16:06:44 +08:00
fix-port-mapping.bat 1 2025-06-30 16:06:44 +08:00
fix-port-mapping.sh 1 2025-06-30 16:06:44 +08:00
fix-port-mismatch.sh 1 2025-06-30 16:27:23 +08:00
fix_sqlalchemy.bat gengxin 2025-07-16 10:55:10 +08:00
force-deploy.bat 1 2025-06-30 16:06:44 +08:00
force-deploy.sh 1 2025-06-30 16:06:44 +08:00
get_gitlink_token.py gengxin 2025-07-16 10:55:10 +08:00
init_db.py 修改 2025-06-20 11:47:04 +08:00
init_enhanced_sync.py gengxin 2025-07-16 10:55:10 +08:00
issue_sync_cli.py 回退到 d82d725d 2025-07-01 08:18:46 +08:00
issue_sync_setup.sql 1 2025-06-30 16:06:44 +08:00
main.py 111 2025-07-16 16:14:25 +08:00
query 修改 2025-06-20 11:47:04 +08:00
quick-fix.sh 回退到 d82d725d 2025-07-01 08:18:46 +08:00
remote-check.sh 1 2025-06-30 16:06:44 +08:00
requirement.txt Update requirement.txt 2025-07-01 08:35:18 +08:00
start_backend.py 修改 2025-06-20 11:47:04 +08:00
start_issue_sync.py 回退到 d82d725d 2025-07-01 08:18:46 +08:00
sync.py init 2024-04-10 14:32:49 +08:00
sync_gitee_to_gitlink.py gengxin 2025-07-16 10:55:10 +08:00
sync_gitlink_to_gitee.py gengxin 2025-07-16 10:55:10 +08:00
test_db.py 修改 2025-06-20 11:47:04 +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)