Go to file
xxq250 a2a07770d3 Merge pull request '修复关于强制仓库覆盖的问题' (#1) from develop into master 2023-01-05 15:15:36 +08:00
__pycache__ allow github can be null 2022-08-07 23:59:15 +08:00
doc init push 2022-07-11 10:52:10 +08:00
extras/obfastapi init push 2022-07-11 10:52:10 +08:00
logs allow github can be null 2022-08-07 23:59:15 +08:00
script init push 2022-07-11 10:52:10 +08:00
sql fixed 表增加索引 2022-08-15 10:40:23 +08:00
src fixed job列表增加分支来源条件查询 2022-08-15 13:51:03 +08:00
sync fix repo force push problem 2023-01-05 14:36:37 +08:00
web 日志增加时间显示,调整css 2022-08-11 15:54:11 +08:00
Dockerfile support centos7 and python3.9 in Dockerfile 2022-07-14 17:15:40 +08:00
LICENSE init push 2022-07-11 10:52:10 +08:00
Makefile init push 2022-07-11 10:52:10 +08:00
README-CN.md init push 2022-07-11 10:52:10 +08:00
README.md init push 2022-07-11 10:52:10 +08:00
boot init push 2022-07-11 10:52:10 +08:00
env.ini.example init push 2022-07-11 10:52:10 +08:00
main.py init push 2022-07-11 10:52:10 +08:00
requirement.txt init push 2022-07-11 10:52:10 +08:00
sync.py init push 2022-07-11 10:52:10 +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)