Compare commits

...

No commits in common. "master" and "master" have entirely different histories.

97 changed files with 1401 additions and 39 deletions

63
.devops/Test.yml Normal file
View File

@ -0,0 +1,63 @@
version: 2
name: Test
description: ""
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((ssh.password))
ssh_ip: '"47.97.180.226"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: "\"docker stop zealous_elion && docker rm zealous_elion && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group7:latest &&
docker run -it -d -e CEROBOT_MYSQL_HOST='113.219.237.121' -e
CEROBOT_MYSQL_PORT=34118 -e CEROBOT_MYSQL_USER=root -e
CEROBOT_MYSQL_PWD='' -e CEROBOT_MYSQL_DB='reposyncer' -e BOOT_MODE='app'
-p 8089:8000 --name zealous_elion -d
registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group7:latest\""
needs:
- docker_image_build_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
remote_url: '"https://gitlink.org.cn/wangmingqiang/reposync.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((Docker.user))
docker_password: ((Docker.password))
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group7"'
image_tag: '"latest"'
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: git_clone_0.git_path
image_push: true
build_args: '""'
needs:
- git_clone_0

8
.gitignore vendored
View File

@ -1,8 +0,0 @@
logs/
.git
__pycache__
*.pyc
*.pyo
build
dist
.vscode

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# 默认忽略的文件
/shelf/
/workspace.xml

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
sync测试流水线.py

View File

@ -0,0 +1,19 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="scikit-image" />
<item index="1" class="java.lang.String" itemvalue="slidingwindow" />
<item index="2" class="java.lang.String" itemvalue="cython" />
<item index="3" class="java.lang.String" itemvalue="imgaug" />
<item index="4" class="java.lang.String" itemvalue="argparse" />
<item index="5" class="java.lang.String" itemvalue="IPython" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.9" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/reposyncer演化.iml" filepath="$PROJECT_DIR$/.idea/reposyncer演化.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

13
API.md
View File

@ -198,9 +198,20 @@ SYNC_DIR = os.getenv("SYNC_DIR", "/tmp/sync_dir/")
| 参数 | 类型 | 示例输入 | 是否必须 | 说明 |
|--------------|--------|---------|------| --- |
| repo_name | string | | yes | 仓库名称 |
| branch_id | string | 1,2,3 | no | 分支id |
| page_num | int | 默认1 | no | 页数 |
| page_size | int | 默认10 | no | 条数 |
| create_sort | bool | 默认False | no |创建时间排序, 默认倒序|
注: 获取仓库粒度的同步日志时无需输入分支id
## 日志信息删除
允许用户通过此接口使用多个分支ID或多个仓库名称分页删除仓库/分支的同步日志。
- **URL**`/cerobot/sync/repo/{repo_name}/new_logs`
- **Method**`DELETE`
### 请求参数body
| 参数 | 类型 | 示例输入 | 是否必须 | 说明 |
|--------------|--------|---------|------| --- |
| repo_name | string | | yes | 仓库名称 |
注: 获取仓库粒度的同步日志时无需输入分支id

View File

@ -1,3 +1,4 @@
FROM centos:7
RUN yum update -y && \
@ -7,7 +8,12 @@ RUN cd /data/ob-tool && tar xzf Python-3.9.6.tgz
RUN cd /data/ob-tool/Python-3.9.6 && ./configure --enable-optimizations && make altinstall
ADD ./ /data/ob-robot/
RUN cd /data/ob-robot/ && \
RUN wget https://github.com/encode/uvicorn/archive/refs/tags/0.14.0.tar.gz && \
tar -zvxf 0.14.0.tar.gz && \
cd uvicorn-0.14.0 && \
pip3.9 install . && \
cd /data/ob-robot/ && \
pip3.9 install -r /data/ob-robot/requirement.txt
RUN yum install -y git openssh-server

View File

@ -56,11 +56,6 @@ aiofiles|0.8.0|True
`docker run -p 8000:8000 -d XXX bash start.sh -s backend`
## docker by gitlink
`docker load -i reposync.tar`
`docker run -it -d -e CEROBOT_MYSQL_HOST='127.0.0.1' -e CEROBOT_MYSQL_PORT=3306 -e CEROBOT_MYSQL_USER=root -e CEROBOT_MYSQL_PWD='12345678' -e CEROBOT_MYSQL_DB='reposyncer' -e BOOT_MODE='app' -p 8089:8000 --name reposyncer_app reposync:v2.0`
## How to use it
1. Config your database

Binary file not shown.

58
logs/2024-06-25_api.log Normal file
View File

@ -0,0 +1,58 @@
2024-06-25 11:11:06 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:12:30 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:22:34 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:23:15 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:23:42 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:26:46 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:30:54 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:33:41 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:34:20 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 11:35:15 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 17:13:38 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 17:17:07 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 17:17:48 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wangshunkang/branch
2024-06-25 17:18:27 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 17:18:29 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 17:22:55 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunakng/branch
2024-06-25 17:23:36 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch
2024-06-25 17:23:48 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wangshunkang/branch
2024-06-25 17:24:35 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 17:25:21 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunakng
2024-06-25 17:25:29 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 17:26:08 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-25 17:26:33 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-25 17:27:14 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 17:27:47 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 17:29:26 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 19:42:05 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/repo/wangshunkang/repo_addr 更新仓库信息
2024-06-25 19:42:25 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 19:47:44 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 19:47:55 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 19:51:36 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-25 20:05:58 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 20:06:28 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 20:06:53 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:07:17 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:07:59 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:10:04 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:11:25 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 20:13:58 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:21 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:34 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:34 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:35 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:35 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:35 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:14:40 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:17:51 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-25 20:18:40 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 20:19:09 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:20:06 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:22:34 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 20:22:48 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 20:22:58 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-25 20:27:26 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 20:28:05 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-25 20:28:58 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-25 20:29:13 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-25 20:33:13 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo

View File

@ -0,0 +1,2 @@
2024-06-25 10:59:46.309 | INFO | __main__:sync:506 - Start syncing ****************************
2024-06-25 20:08:58.331 | INFO | __main__:sync:513 - There are no sync jobs in the database

View File

@ -0,0 +1,4 @@
2024-06-25 20:45:38.233 | INFO | __main__:sync:506 - Start syncing ****************************
2024-06-25 20:45:38.323 | INFO | __main__:sync:513 - There are no sync jobs in the database
2024-06-25 20:45:45.043 | INFO | __main__:sync:506 - Start syncing ****************************
2024-06-25 20:45:45.123 | INFO | __main__:sync:513 - There are no sync jobs in the database

71
logs/2024-06-26_api.log Normal file
View File

@ -0,0 +1,71 @@
2024-06-26 17:09:48 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:13:34 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:13:57 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:13:59 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:16:54 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:17:33 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:17:38 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:18:09 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:17 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:17 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:19 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:19 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:19 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:47 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:21:51 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:22:23 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:23:29 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 17:24:07 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:13:27 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:16:24 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:33:47 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:35:22 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:47:53 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:49:41 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:50:05 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 18:59:40 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:01:59 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:02:30 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:02:46 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:02:49 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:04:37 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:06:56 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:07:10 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:08:00 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:09:08 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:10:47 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:11:37 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:12:07 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:19:40 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:20:01 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:20:46 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:23:45 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:24:43 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:31:49 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:34:52 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:35:19 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:35:21 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:35:21 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:35:44 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:36:11 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:36:23 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:36:31 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:37:14 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:38:15 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 19:38:26 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:04:09 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:07:06 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:11:30 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:12:11 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-26 22:12:49 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:22:26 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:22:33 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:22:59 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:25:22 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-26 22:25:34 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-26 22:28:20 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs

View File

@ -0,0 +1 @@
2024-06-26 17:00:58.783 | INFO | __main__:sync:506 - Start syncing ****************************

219
logs/2024-06-27_api.log Normal file
View File

@ -0,0 +1,219 @@
2024-06-27 10:34:05 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:38:51 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:39:44 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:40:05 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:40:22 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:40:23 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:40:24 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:40:32 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:45:05 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:46:51 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:47:18 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:47:21 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:47:29 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:47:31 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:48:38 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:53:01 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:53:14 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:53:21 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:53:36 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:53:43 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:56:13 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:56:26 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 10:59:12 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:02:01 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:03:03 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:03:33 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:04:12 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:06:57 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:07:27 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:07:36 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 11:10:04 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/{repo_names}
2024-06-27 11:14:59 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 11:15:12 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 11:16:05 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-27 11:16:34 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch
2024-06-27 11:16:44 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-27 11:17:00 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch
2024-06-27 11:17:15 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wangshunkang/branch
2024-06-27 11:17:27 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-27 11:17:36 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-27 11:19:00 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-27 11:19:33 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wangshunkang/branch/master
2024-06-27 11:19:44 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:19:49 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:20:00 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 11:21:34 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:21:43 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 11:22:58 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 11:23:05 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 11:23:34 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:23:37 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:23:43 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 11:24:08 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 11:24:29 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 11:24:41 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch
2024-06-27 11:24:54 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 11:25:08 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:25:46 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:26:07 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 11:26:15 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:27:04 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 11:27:12 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:28:00 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:28:23 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:29:30 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/{repo_names}
2024-06-27 11:29:41 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/{repo_names}
2024-06-27 11:29:54 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:30:24 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/{repo_names}
2024-06-27 11:32:57 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/{repo_names}
2024-06-27 11:33:09 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 11:33:28 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 11:33:44 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 14:26:45 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 14:28:36 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 14:28:57 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 14:38:30 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 14:40:02 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 14:40:21 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 14:42:39 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 14:42:45 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 14:49:44 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 14:54:56 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:04:31 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:04:33 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:04:59 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:05:08 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:07:54 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:14 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:15 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:47 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:49 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:58 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:59 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:59 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:59 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:08:59 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:10:16 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 15:12:27 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:12:36 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:13:50 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:23 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:24 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:24 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:25 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:25 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:25 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:25 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:14:25 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:16:56 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:17:08 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:17:12 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:17:12 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:06 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:15 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:16 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:16 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:16 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:16 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:20:16 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:34:46 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:36:40 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:37:12 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:27 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:40 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:50 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:51 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:52 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:52 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:53 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:45:53 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:46:42 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 15:48:34 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:49:44 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:50:31 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:50:31 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:50:32 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:50:32 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:50:32 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:51:27 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:51:56 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:52:28 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:53:05 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:53:29 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:54:12 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:55:16 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:55:22 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 15:56:42 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 16:01:30 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 16:02:30 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 16:07:10 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs
2024-06-27 16:19:57 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 16:21:27 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:32:21 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs/remove
2024-06-27 19:32:53 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:36:12 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:36:35 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:36:48 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:40:38 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 19:40:51 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:40:58 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:41:04 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:41:10 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:41:38 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wsk/branch
2024-06-27 19:41:54 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:42:10 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:42:24 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:42:28 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:42:52 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 19:43:22 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 19:43:37 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:44:01 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:44:10 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:44:21 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:44:28 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:48:50 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:48:59 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:51:01 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:51:08 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:51:41 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:52:09 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wangshunkang
2024-06-27 19:52:44 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs/remove
2024-06-27 19:52:53 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:53:04 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 19:53:16 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:53:25 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:53:36 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:53:46 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 19:55:21 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 19:55:29 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:55:43 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wsk/branch
2024-06-27 19:56:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wsk/branch
2024-06-27 19:56:36 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 19:56:45 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:13 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch
2024-06-27 19:57:23 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 19:57:34 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:38 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:39 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:39 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:39 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:40 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:57:56 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wsk/branch
2024-06-27 19:58:14 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:58:24 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wsk
2024-06-27 19:58:37 | INFO | robot - 用户 robot 使用 PUT 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 19:58:44 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 19:59:01 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 20:00:51 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wsk/branch/master
2024-06-27 20:06:10 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 20:07:33 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo
2024-06-27 20:07:41 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo
2024-06-27 20:07:55 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/wskk/branch
2024-06-27 20:08:11 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wskk/branch
2024-06-27 20:08:16 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/repo/wskk
2024-06-27 20:08:34 | INFO | robot - 用户 robot 使用 POST 方法访问接口 /cerobot/sync/wskk/branch/master
2024-06-27 20:08:47 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 20:26:21 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs
2024-06-27 20:58:07 | INFO | robot - 用户 robot 使用 DELETE 方法访问接口 /cerobot/sync/repo/new_logs/remove
2024-06-27 20:58:18 | INFO | robot - 用户 robot 使用 GET 方法访问接口 /cerobot/sync/repo/logs

View File

View File

@ -0,0 +1,114 @@
2024-06-25 17:25:29 | INFO | robot - 初始化仓库 *********
2024-06-25 17:25:29 | INFO | robot - Execute cmd: git clone
2024-06-25 17:25:31 | INFO | robot - 添加/更新仓库信息
2024-06-25 17:25:32 | INFO | robot - 添加/更新仓库信息
2024-06-25 17:25:36 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 17:25:36 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 17:25:36 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 17:25:37 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 17:25:38 | INFO | robot - Execute cmd: git push external master:master
2024-06-25 17:25:39 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 17:25:39 | INFO | robot - [COMMIT ID: 1a5a73a]
2024-06-25 17:25:39 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 17:26:33 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 17:26:33 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 17:26:33 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 17:26:34 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 17:26:34 | INFO | robot - Execute cmd: git push external master:master
2024-06-25 17:26:35 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 17:26:35 | INFO | robot - [COMMIT ID: 1a5a73a]
2024-06-25 17:26:35 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 19:47:44 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 19:47:44 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 19:47:44 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 19:47:46 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 19:47:46 | INFO | robot - Execute cmd: git push external master:master
2024-06-25 19:47:47 | ERROR | robot - To https://gitee.com/wsk00/123.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/wsk00/123.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
2024-06-25 19:47:55 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 19:47:55 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 19:47:55 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 19:47:55 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 19:47:55 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 19:47:59 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 19:47:59 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 19:47:59 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:06:53 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:06:53 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:06:53 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:06:54 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:06:54 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 20:06:55 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:06:55 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:06:55 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:07:17 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:07:17 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:07:17 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:07:18 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:07:18 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 20:07:20 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:07:20 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:07:20 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:07:59 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:07:59 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:07:59 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:08:00 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:08:00 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 20:08:01 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:08:01 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:08:01 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:10:04 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:10:04 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:10:04 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:10:04 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:10:05 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 20:10:06 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:10:06 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:10:06 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:19:09 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:19:09 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:19:09 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:19:09 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:19:10 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 20:19:11 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:19:11 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:19:11 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:20:06 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:20:06 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:20:06 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:20:07 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:20:07 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-25 20:20:09 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:20:09 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:20:09 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:28:05 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:28:05 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:28:05 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:28:05 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:28:05 | INFO | robot - Execute cmd: git push external master:master
2024-06-25 20:28:07 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:28:07 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:28:07 | INFO | robot - ************ 分支同步完成 ************
2024-06-25 20:28:58 | INFO | robot - ************ 执行分支同步 ************
2024-06-25 20:28:58 | INFO | robot - Execute inter to outer master branch Sync
2024-06-25 20:28:58 | INFO | robot - Execute cmd: git fetch internal master
2024-06-25 20:28:59 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-25 20:28:59 | INFO | robot - Execute cmd: git push external master:master
2024-06-25 20:29:00 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-25 20:29:00 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-25 20:29:00 | INFO | robot - ************ 分支同步完成 ************
2024-06-26 22:25:22 | INFO | robot - ************ 执行分支同步 ************
2024-06-26 22:25:22 | INFO | robot - Execute inter to outer master branch Sync
2024-06-26 22:25:22 | INFO | robot - Execute cmd: git fetch internal master
2024-06-26 22:25:24 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-26 22:25:24 | INFO | robot - Execute cmd: git push external master:master
2024-06-26 22:25:27 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-26 22:25:27 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-26 22:25:27 | INFO | robot - ************ 分支同步完成 ************

View File

@ -0,0 +1,30 @@
2024-06-27 11:16:44 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 11:16:44 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:16:44 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:16:44 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 11:17:27 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 11:17:27 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:17:27 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:17:27 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 11:17:36 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 11:17:36 | INFO | robot - Execute outer to inter master branch Sync
2024-06-27 11:17:36 | INFO | robot - Execute cmd: git fetch external master
2024-06-27 11:17:36 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 11:19:33 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 11:19:33 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:19:33 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:19:33 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 11:19:44 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 11:19:44 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:19:44 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:19:44 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 11:19:49 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 11:19:49 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:19:49 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:19:49 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git

View File

@ -0,0 +1,50 @@
2024-06-27 19:57:23 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:23 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:23 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:23 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:57:34 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:34 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:34 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:34 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:57:38 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:38 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:38 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:38 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:57:39 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:39 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:39 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:39 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:57:39 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:39 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:39 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:39 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:57:39 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:39 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:39 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:39 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:57:40 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:57:40 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:57:40 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:57:40 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:58:24 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:58:24 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:58:24 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:58:24 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:58:44 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 19:58:44 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:58:44 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:58:44 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 20:00:51 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 20:00:51 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 20:00:51 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 20:00:51 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git

91
logs/sync_wsk_history.log Normal file
View File

@ -0,0 +1,91 @@
2024-06-27 11:24:08 | INFO | robot - 初始化仓库 *********
2024-06-27 11:24:08 | INFO | robot - Execute cmd: git clone
2024-06-27 11:24:11 | INFO | robot - 添加/更新仓库信息
2024-06-27 11:24:12 | INFO | robot - 添加/更新仓库信息
2024-06-27 11:24:15 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 11:24:15 | INFO | robot - 获取仓库分支信息
2024-06-27 11:24:16 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:24:16 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:24:17 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-27 11:24:18 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-27 11:24:19 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-27 11:24:19 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-27 11:24:19 | INFO | robot - ************ wsk仓库同步完成 ************
2024-06-27 11:26:07 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 11:26:07 | INFO | robot - 获取仓库分支信息
2024-06-27 11:26:08 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:26:08 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:26:08 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-27 11:26:08 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-27 11:26:10 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-27 11:26:10 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-27 11:26:10 | INFO | robot - ************ wsk仓库同步完成 ************
2024-06-27 11:27:04 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 11:27:04 | INFO | robot - 获取仓库分支信息
2024-06-27 11:27:05 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 11:27:05 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 11:27:06 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-27 11:27:06 | INFO | robot - Execute cmd: git push external master:master
2024-06-27 11:27:07 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-27 11:27:07 | INFO | robot - [COMMIT ID: 9979ba0]
2024-06-27 11:27:07 | INFO | robot - ************ wsk仓库同步完成 ************
2024-06-27 19:40:58 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:40:58 | INFO | robot - 获取仓库分支信息
2024-06-27 19:40:59 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:40:59 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:40:59 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:41:04 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:41:04 | INFO | robot - 获取仓库分支信息
2024-06-27 19:41:05 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:41:05 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:41:05 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:41:10 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:41:10 | INFO | robot - 获取仓库分支信息
2024-06-27 19:41:11 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:41:11 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:41:11 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:42:10 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:42:10 | INFO | robot - 获取仓库分支信息
2024-06-27 19:42:11 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:42:11 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:42:11 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:42:24 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:42:24 | INFO | robot - 获取仓库分支信息
2024-06-27 19:42:26 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:42:26 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:42:26 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:42:28 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:42:28 | INFO | robot - 获取仓库分支信息
2024-06-27 19:42:29 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:42:29 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:42:29 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:44:01 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:44:01 | INFO | robot - 获取仓库分支信息
2024-06-27 19:44:02 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:44:02 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:44:02 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:44:21 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:44:21 | INFO | robot - 获取仓库分支信息
2024-06-27 19:44:23 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:44:23 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:44:23 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:48:50 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:48:50 | INFO | robot - 获取仓库分支信息
2024-06-27 19:48:52 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:48:52 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:48:52 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git
2024-06-27 19:51:01 | INFO | robot - ************ 执行wsk仓库同步 ************
2024-06-27 19:51:01 | INFO | robot - 获取仓库分支信息
2024-06-27 19:51:02 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 19:51:02 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 19:51:02 | ERROR | robot - fatal: not a git repository (or any of the parent directories): .git

View File

@ -0,0 +1,20 @@
2024-06-27 20:08:16 | INFO | robot - 初始化仓库 *********
2024-06-27 20:08:16 | INFO | robot - Execute cmd: git clone
2024-06-27 20:08:21 | INFO | robot - 添加/更新仓库信息
2024-06-27 20:08:22 | INFO | robot - 添加/更新仓库信息
2024-06-27 20:08:23 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 20:08:23 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 20:08:23 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 20:08:25 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-27 20:08:26 | INFO | robot - Execute cmd: git push --force external master:master
2024-06-27 20:08:28 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-27 20:08:28 | INFO | robot - [COMMIT ID: 3786f9c]
2024-06-27 20:08:28 | INFO | robot - ************ 分支同步完成 ************
2024-06-27 20:08:34 | INFO | robot - ************ 执行分支同步 ************
2024-06-27 20:08:34 | INFO | robot - Execute inter to outer master branch Sync
2024-06-27 20:08:34 | INFO | robot - Execute cmd: git fetch internal master
2024-06-27 20:08:36 | INFO | robot - Execute cmd: git checkout -B master internal/master
2024-06-27 20:08:36 | INFO | robot - Execute cmd: git push external master:master
2024-06-27 20:08:38 | INFO | robot - Execute cmd: git log -1 --format="%H"
2024-06-27 20:08:38 | INFO | robot - [COMMIT ID: 3786f9c]
2024-06-27 20:08:38 | INFO | robot - ************ 分支同步完成 ************

View File

@ -0,0 +1,2 @@
2024-06-25 19:42:05 | INFO | robot - 添加/更新仓库信息
2024-06-25 19:42:05 | INFO | robot - 添加/更新仓库信息

View File

@ -7,6 +7,7 @@ from fastapi import (
Query,
Security
)
from typing import Dict
from starlette.requests import Request
from src.utils import base
@ -284,17 +285,54 @@ class SyncDirection(Controller):
repo_name_list = repo_name.split(',') if repo_name is not None else []
data = await self.log_service.get_logs(repo_name_list=repo_name_list, branch_id_list=branch_id_list,
page_num=page_num, page_size=page_size, create_sort=create_sort)
print(repo_name_list)
if not data:
return SYNCResponse(
code_status=Status.NOT_DATA.code,
total=data[0],
total=data[0],#len(data[1]),#错误的data[0]是最后一条日志id并不代表日志数
data=data[1],
msg=Status.NOT_DATA.msg
)
return SYNCResponse(
code_status=Status.SUCCESS.code,
total=data[0],
total=data[0],#len(data[1]),
data=data[1],
msg=Status.SUCCESS.msg
)
@router.delete("/repo/new_logs/remove", response_model=SYNCResponse, description='删除仓库日志')
async def delete_logs(
self, request: Request, user: str = Depends(user),
repo_name: str = Query(None, description="仓库名称")
):
api_log(LogType.INFO, f"用户 {user} 使用 DELETE 方法访问接口 {request.url.path} ", user)
result = await self.log_service.delete_logs(repo_name=repo_name)
return SYNCResponse(
code_status=result.code_status,
msg=result.status_msg
)
@router.put("/repo/logss", response_model=SYNCResponse, description='仓库日志操作')
async def put_logs(
self, request: Request, user: str = Depends(user),
repo_name: str = Query(None, description="仓库名称"),
):
api_log(LogType.INFO, f"用户 {user} 使用 GET 方法访问接口 {request.url.path} ", user)
repo_name_list = repo_name.split(',') if repo_name is not None else []
data = await self.log_service.insert_repo_log(repo_name_list=repo_name_list, direct='')
if not data:
return SYNCResponse(
code_status=Status.NOT_DATA.code,
msg=Status.NOT_DATA.msg
)
return SYNCResponse(
code_status=Status.SUCCESS.code,
msg=Status.SUCCESS.msg
)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -33,11 +33,11 @@ buc_key and ConfigsUtil.set_obfastapi_config('buc_key', buc_key)
DB_ENV = getenv('DB_ENV', 'test_env')
DB = {
'test_env': {
'host': getenv('CEROBOT_MYSQL_HOST', ''),
'port': getenv('CEROBOT_MYSQL_PORT', 2883, int),
'user': getenv('CEROBOT_MYSQL_USER', ''),
'passwd': getenv('CEROBOT_MYSQL_PWD', ''),
'dbname': getenv('CEROBOT_MYSQL_DB', '')
'host': getenv('CEROBOT_MYSQL_HOST', 'localhost'),
'port': getenv('CEROBOT_MYSQL_PORT', 3306, int),
'user': getenv('CEROBOT_MYSQL_USER', 'root'),
'passwd': getenv('CEROBOT_MYSQL_PWD', '123456'),
'dbname': getenv('CEROBOT_MYSQL_DB', 'reposyncer')
},
'local': {
'host': getenv('CEROBOT_MYSQL_HOST', ''),

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -105,9 +105,7 @@ def inter_to_outer(repo, branch, log_name: str, user: str, force_flag):
# commit_id = result.stdout.split(" ")[0]
result = shell(f'git log -1 --format="%H"', repo_dir, log_name, user)
commit_id = result.stdout[0:7]
result2 = shell(f'git log -1 --format=%s', repo_dir, log_name, user)
msg = result2.stdout[0:50]
sync_log(LogType.INFO, f'[COMMIT ID: {commit_id}, msg: {msg}...]', log_name, user)
sync_log(LogType.INFO, f'[COMMIT ID: {commit_id}]', log_name, user)
return commit_id
except Exception as e:
raise
@ -132,9 +130,7 @@ def outer_to_inter(repo, branch, log_name: str, user: str, force_flag):
# commit_id = result.stdout.split(" ")[0]
result = shell(f'git log -1 --format=%h', repo_dir, log_name, user)
commit_id = result.stdout[0:7]
result2 = shell(f'git log -1 --format=%s', repo_dir, log_name, user)
msg = result2.stdout[0:50]
sync_log(LogType.INFO, f'[COMMIT ID: {commit_id}, msg: {msg}...]', log_name, user)
sync_log(LogType.INFO, f'[COMMIT ID: {commit_id}]', log_name, user)
return commit_id
except Exception as e:
raise

View File

@ -176,18 +176,18 @@ class LogService(Service):
log_.write(log_content)
# 使用正则表达式匹配所有的日期和时间格式
timestamps = re.findall(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', log_content)
# first_time = time_trans(timestamps[0]) if timestamps else datetime.now()
# last_time = time_trans(timestamps[-1]) if timestamps else datetime.now()
first_time = time_trans(timestamps[0]) if timestamps else datetime.now()
last_time = time_trans(timestamps[-1]) if timestamps else datetime.now()
first_time = timestamps[0] if timestamps else datetime.now()
last_time = timestamps[-1] if timestamps else datetime.now()
await self.sync_log_dao.insert_sync_repo_log(repo_name=repo_name, direct=direct, log_content=log_content,
first_time=first_time, last_time=last_time)
# stm = {"repo_name": repo_name, "branch_id": None, "commit_id": None}
# log = await self.sync_log_dao.filter(**stm)
# if len(log) < 1:
# await self.sync_log_dao.init_sync_repo_log(repo_name=repo_name, direct=direct, log_content=log_content)
# else:
# await self.sync_log_dao.update_sync_repo_log(repo_name=repo_name, direct=direct, log_content=log_content)
stm = {"repo_name": repo_name, "branch_id": None, "commit_id": None}
log = await self.sync_log_dao.filter(**stm)
if len(log) < 1:
await self.sync_log_dao.init_sync_repo_log(repo_name=repo_name, direct=direct, log_content=log_content)
else:
await self.sync_log_dao.update_sync_repo_log(repo_name=repo_name, direct=direct, log_content=log_content)
async def insert_branch_log(self, repo_name: str, direct: str, branch_id: int, commit_id: str):
addr = f"{log_path}/sync_{repo_name}_{branch_id}.log"
@ -216,10 +216,10 @@ class LogService(Service):
page_number=page_num, page_size=page_size, create_sort=create_sort)
return logs
async def delete_logs(self, repo_name: str) -> SYNCException:
async def delete_logs(self, repo_name: str) -> SYNCException:
logs = await self.sync_log_dao.filter(repo_name=repo_name)
if logs:
if logs :
for log in logs:
await self.sync_log_dao.delete(log)
return SYNCException(Status.SUCCESS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

537
sync测试流水线.py Normal file
View File

@ -0,0 +1,537 @@
import asyncio
import os
import json
from typing import Optional
import requests
import re
from pathlib import Path
#测试
from src.service.pull_request import PullRequestService
from src.service.sync import JobService, ProjectService
from src.service.log import LogService
from src.dto.sync import Color, SyncType
from src.dto.sync import Job as JobDTO
from src.dto.pull_request import PullRequest as PullRequestDTO
from src.dto.sync import Project as ProjectDTO
from src.utils import cmd, author, gitlab, github
from src.utils.logger import logger
from src.base import config
from src.utils.logger import Log
from src.base.code import LogType
from src.common.repo import Repo, RepoType
async def apply_diff(project, job, pull: PullRequestDTO, dir):
organization, repo = github.transfer_github_to_name(project.github_address)
baseUrl = ""
if pull.type == RepoType.Github:
baseUrl = f"{config.GITHUB_ENV['github_api_diff_address']}/{organization}/{repo}/pull/"
elif pull.type == RepoType.Gitee:
baseUrl = f"{config.GITEE_ENV['gitee_api_diff_address']}/{organization}/{repo}/pull/"
elif pull.type == RepoType.Gitcode:
pass
diffUrl = baseUrl + str(pull.id) + ".diff"
tmpfile = dir + "/" + str(pull.id) + "_diff"
download_diff_cmd = ""
if pull.type == RepoType.Github:
download_diff_cmd = f"curl -X GET {diffUrl} -H 'Accept: application/vnd.github.v3.diff'"
elif pull.type == RepoType.Gitee:
download_diff_cmd = f"curl -X GET {diffUrl}"
elif pull.type == RepoType.Gitcode:
pass
with open(tmpfile, "w") as diff_file:
diff, err = await cmd.shell(download_diff_cmd, dir, job)
diff_file.write(diff)
# git apply --check first
out, err = await cmd.shell('git apply --check ' + tmpfile, dir, job)
if out != "":
raise ValueError(f"git apply --check failed")
out, err = await cmd.shell('git apply ' + tmpfile, dir, job)
if err.startswith("error"):
await Log(LogType.ERROR, "The git apply operation has some conflict", job.id)
await cmd.shell('rm -rf ' + dir, '.', job)
return
await cmd.shell(f"rm -rf {tmpfile}", dir, job)
await cmd.shell('git add .', dir, job)
async def sync_common(project, job, pull: PullRequestDTO):
try:
await Log(LogType.INFO, f"The project base repo is {project.base}", job.id)
await Log(LogType.INFO, f"Sync the job code from other repo to base {project.base} repo", job.id)
dir = f"/tmp/{job.project}_job_inter_{job.id}_pull_{pull.id}"
await Log(LogType.INFO, f"The pull request dir is {dir}", job.id)
await cmd.shell('mkdir ' + dir, '.', job)
await cmd.shell(
f"git clone -b {job.gitlab_branch} {project.gitlab_address}", dir, job)
repo_dir = dir + "/" + project.name
# GitHub pull request
if project.base != RepoType.Github and project.github_address is not None:
await cmd.shell('git status', repo_dir, job)
new_branch = 'github_pr' + str(pull.id)
await Log(LogType.INFO, f"The new branch is {new_branch}", job.id)
await cmd.shell('git checkout -b ' + new_branch, repo_dir, job)
apply_diff(project, job, pull, repo_dir)
commit_msg = "Github pull request #" + str(pull.id)
await cmd.shell(f"git commit -m \"{commit_msg}\"", repo_dir, job)
await cmd.shell(f"git push -uv origin {new_branch}", repo_dir, job)
inter_type = gitlab.get_inter_repo_type(project.gitlab_address)
if inter_type is None:
await Log(LogType.ERROR,
f"The {project.gitlab_address} is not belong to gitlab or antcode", job.id)
else:
# send a merge request
if inter_type == 'gitlab':
# Alibaba Gitlab repoCode Aone
await Log(LogType.INFO,
f"Merge the pull request to internal Gitlab {project.name}", job.id)
repo_id = gitlab.get_repo_id_from_url(
project.gitlab_address)
if repo_id is None:
await Log(LogType.ERROR,
f"We can not get the repo id {repo_id}", job.id)
await Log(LogType.INFO,
f"The project's gitlab repo id is {repo_id}", job.id)
await Log(LogType.INFO,
f"send the merge request about the pull request #{pull.id}", job.id)
merge_to_code_aone_inter(
repo_id, pull.id, new_branch, job.gitlab_branch)
else:
# Alipay Antcode repo
await Log(LogType.INFO,
f"Merge the pull request to internal Antcode {project.name}", job.id)
organization, name = gitlab.get_organization_and_name_from_url(
project.gitlab_address)
merge_to_antcode_inter(
job.id, pull.id, organization, name, new_branch, job.gitlab_branch)
# update the pull request inline status
service = PullRequestService()
await service.update_inline_status(pull, True)
await service.update_latest_commit(pull)
# Gitee pull request
# TODO: Gitcode pull request
except:
msg = f"The pull request #{pull.id} sync to the internal failed"
await Log(LogType.ERROR, msg, job.id)
finally:
await cmd.shell('rm -rf ' + dir, '.', job)
def merge_to_code_aone_inter(repo_id: int, pull_id: int, source_branch: str, target_branch: str):
url = f""
param = {
'private_token': config.ACCOUNT['gitlab_token'],
}
data = {
"description": "Merge the pull request #" + str(pull_id),
"source_branch": source_branch,
"target_branch": target_branch,
"title": "Merge the pull request #" + str(pull_id)
}
response = requests.post(url=url, params=param,
data=json.dumps(data)).json()
return response
async def merge_to_antcode_inter(job_id: int, pull_id: int, organization, name, source_branch, target_branch: str):
await Log(LogType.INFO,
"send the merge request about the pull request #{pull_id}", job_id)
headers = {
"PRIVATE-TOKEN": config.ACCOUNT['antcode_token']
}
mainSiteUrl = ""
organization = "oceanbase-docs"
name = "oceanbase-doc"
path = f"{organization}/{name}"
req_str = f"{mainSiteUrl}/api/v3/projects/find_with_namespace?path={path}"
response = requests.get(url=req_str, headers=headers).json()
projectId = response['id']
await Log(LogType.INFO, f"The Antcode project ID is {projectId}", job_id)
# merge request
merge_req_str = f"{mainSiteUrl}/api/v3/projects/{projectId}/pull_requests"
param = {
'source_branch': source_branch,
'target_branch': target_branch,
'squash_merge': True
}
response = requests.post(
url=merge_req_str, param=param, headers=headers).json()
return
async def sync_oceanbase(project, job, pull):
title = f"Github merge request #{pull.id} {pull.title}"
# Sync OceanBase code need ob flow
await Log(LogType.INFO, "Sync the oceanbase code from github to inter", job.id)
# Create ob task
create_task_cmd = f"/usr/local/obdev/libexec/ob-task create --subject=\"{title}\" -T bug --branch={job.gitlab_branch} --description=\"{title}\""
out, err = await cmd.shell(create_task_cmd, '.', job, env=dict(os.environ, AONE_ISSUE_NICK='官明'))
issue_num = str.splitlines(out)[1].replace("[issue-id]", "").strip()
await Log(LogType.INFO,
f"The issue number is {issue_num} about the oceanbase pull request {pull.id}", job.id)
task_id = issue_num.replace("T", "")
if task_id != "":
await Log(LogType.INFO,
f"Create the task {task_id} successfully by ob flow", job.id)
await cmd.shell(
f"/usr/local/obdev/libexec/ob-flow start T{task_id} {job.gitlab_branch}", '.', job, env=dict(
os.environ, OB_FLOW_PROJECT='oceanbase'))
task_addr = f"/data/1/wangzelin.wzl/task-{task_id}"
apply_diff(project, job, pull, task_addr)
await cmd.shell(f"git commit -m \"{title}\"", task_addr, job)
await cmd.shell("/usr/local/obdev/libexec/ob-flow checkin", task_addr, job)
service = PullRequestService()
await service.update_inline_status(pull, True)
await service.update_latest_commit(pull)
async def sync_pull_request(project, job):
organization, repo = github.transfer_github_to_name(project.github_address)
if organization and repo:
pull_request_service = PullRequestService()
await pull_request_service.sync_pull_request(project.name, organization, repo)
pull_request_service = PullRequestService()
pull_request_list = await pull_request_service.fetch_pull_request(project=job.project)
if pull_request_list and len(pull_request_list) > 0:
await Log(LogType.INFO,
f"There are {len(pull_request_list)} pull requests in the database", job.id)
for pull in pull_request_list:
if pull.target_branch == job.github_branch:
await Log(LogType.INFO,
f"Judge the pull request #{pull.id} of project {project.name} if need to merge", job.id)
need_merge = await pull_request_service.judge_pull_request_need_merge(project.name, organization, repo, pull.id)
if need_merge:
await Log(LogType.INFO,
f"The pull request #{pull.id} of project {project.name} need merge", job.id)
if job.project == "oceanbase":
# Add a self config to sync the pull request what you want
if pull.id in config.OCEANBASE:
await sync_oceanbase(project, job, pull)
else:
await sync_common(project, job, pull)
else:
await Log(LogType.INFO,
f"The pull request #{pull.id} of project {project.name} does not need merge", job.id)
return
async def sync_inter_code(project, job):
# Judge the repo type
if job.type == SyncType.OneWay:
await sync_oneway_inter_code(project, job)
elif job.type == SyncType.TwoWay:
await sync_twoway_inter_code(project, job)
else:
await Log(LogType.ERROR,
"The job {job.github_branch}'s type of project {project.name} is wrong", job.id)
return
async def sync_oneway_inter_code(project: ProjectDTO, job: JobDTO):
service = JobService()
await Log(LogType.INFO, "Sync the job code to outer", job.id)
dir = f"/data/1/tmp/{job.project}_job_outer_{job.id}"
await Log(LogType.INFO, f"The sync work dir is {dir}", job.id)
try:
await cmd.shell('mkdir ' + dir, '.', job)
await cmd.shell(
f"git clone -b {job.gitlab_branch} {project.gitlab_address} --depth=100", dir, job)
repo_dir = dir + "/" + project.name
await cmd.shell('git status', repo_dir, job)
await cmd.shell(
f"git remote add github {project.github_address}", repo_dir, job)
await cmd.shell('git fetch github', repo_dir, job)
await cmd.shell(
f"git checkout -b out_branch github/{job.github_branch}", repo_dir, job)
await cmd.shell('git checkout ' + job.gitlab_branch, repo_dir, job)
if project.gitee_address:
await cmd.shell(
f"git remote add gitee {project.gitee_address}", repo_dir, job)
await cmd.shell('git fetch gitee', repo_dir, job)
if project.code_china_address:
await cmd.shell(
f"git remote add csdn {project.code_china_address}", repo_dir, job)
result, err = await cmd.shell('git status', repo_dir, job)
# fetch the latest commit
latestCommit = await service.get_job_lateset_commit(job.id)
await Log(LogType.INFO, 'The lastest commit is ' + latestCommit, job.id)
if latestCommit == 'no_commit':
result, err = await cmd.shell(
f"git log HEAD^1..HEAD --oneline --merges", repo_dir, job)
commit = result.split(" ")[0]
await Log(LogType.INFO, f"patch the commit {commit}", job.id)
await patch_every_commit(repo_dir, project, job, commit)
return
else:
result, err = await cmd.shell(
"git log "+latestCommit + "..HEAD --oneline --merges", repo_dir, job)
if result == "":
await Log(LogType.INFO,
f"The commit {latestCommit} is the newest commit on the remote branch", job.id)
else:
commit_info_list = str.splitlines(result)
commit_info_list.reverse()
for commit_info in commit_info_list:
commit = commit_info.split(" ")[0]
await Log(LogType.INFO, "patch the commit " + commit, job.id)
await patch_every_commit(repo_dir, project, job, commit)
except:
msg = f"Sync the code from inter to outer of project {project.name} branch {job.github_branch} failed"
await Log(LogType.ERROR, msg, job.id)
finally:
await cmd.shell(f"rm -rf {dir}", '.', job)
await Log(LogType.INFO, f"remove the temper repo folder {dir}", job.id)
return
async def sync_twoway_inter_code(project, job):
service = JobService()
await Log(LogType.INFO, "Sync the job document to outer", job.id)
dir = "/tmp/" + job.project+"_job_outer_"+str(job.id)
await Log(LogType.INFO, f"The sync work dir is {dir}", job.id)
try:
await cmd.shell('mkdir ' + dir, '.', job)
await cmd.shell(
f"git clone -b {job.gitlab_branch} {project.gitlab_address}", dir, job)
repo_dir = dir + "/" + project.name
await cmd.shell('git status', repo_dir, job)
await cmd.shell('git remote add github ' +
project.github_address, repo_dir, job)
await cmd.shell('git fetch github', repo_dir, job)
await cmd.shell('git pull -r github ' + job.github_branch, repo_dir, job)
await cmd.shell(
f"git push origin {job.gitlab_branch} -f", repo_dir, job)
await cmd.shell(
f"git push github {job.github_branch} -f", repo_dir, job)
if project.gitee_address:
await cmd.shell('git remote add gitee ' +
project.gitee_address, repo_dir, job)
await cmd.shell('git fetch gitee', repo_dir, job)
await cmd.shell(
f"git push gitee {job.gitlab_branch}:{job.gitee_branch}", repo_dir, job)
if project.code_china_address:
await cmd.shell('git remote add csdn ' +
project.code_china_address, repo_dir, job)
result, err = await cmd.shell('git status', repo_dir, job)
await cmd.shell(
f"git push csdn {job.gitlab_branch}:{job.code_china_branch}", repo_dir, job)
# update the latest commit hash
result, err = await cmd.shell(
"git log HEAD~1..HEAD --oneline", repo_dir, job)
commit = result.split(" ")[0]
await service.update_job_lateset_commit(job.id, commit)
except:
msg = f"Sync the document from inter to outer of project {project.name} branch {job.github_branch} failed"
await Log(LogType.Error, msg, job.id)
finally:
await cmd.shell(f"rm -rf {dir}", '.', job)
await Log(LogType.INFO, f"remove the temper repo folder {dir}", job.id)
return
def get_author_from_oceanbase(author_content: str) -> Optional[str]:
partten = r'Author : (.*) \((.*)\)'
matchObj = re.match(partten, author_content, re.M | re.I)
if matchObj:
author = matchObj.group(2)
return author.split('#')[0]
return None
async def patch_every_commit(dir, project, job, commit):
service = JobService()
try:
await cmd.shell('git status', dir, job)
await cmd.shell('git checkout ' + job.gitlab_branch, dir, job)
await cmd.shell('git pull -r origin ' + job.gitlab_branch, dir, job)
await cmd.shell('git reset --hard ' + commit, dir, job)
# Get the commit comment
output, err = await cmd.shell("git log -1", dir, job)
email, err = await cmd.shell("git log --format='%ae' -1", dir, job)
if email is None:
raise ValueError("The commit has no email")
await Log(LogType.INFO, f"The commit {commit} email is {email}", job.id)
if project.name == "oceanbase":
author_string = str.splitlines(output)[8].strip()
await Log(LogType.INFO,
f"The author string is {author_string}", job.id)
domain = get_author_from_oceanbase(author_string)
else:
domain = author.get_author_domain(email)
if domain is None:
raise ValueError("The commit author has no ali domain")
await Log(LogType.INFO, f"The commit author ali domain is {domain}", job.id)
content = str.splitlines(output)[5].strip()
await Log(LogType.INFO, f"content is {content}", job.id)
if content is None or content == "":
raise ValueError("The commit has no commit content")
await Log(LogType.INFO, f"The commit {commit} content is {content}", job.id)
# TODO if find the commit is from github, merge the pull request
if content.startswith("Github Merge"):
pr_id = int(content.split()[3].replace('#', ''))
pr_service = PullRequestService()
organization, repo = github.transfer_github_to_name(
project.github_address)
ans = await pr_service.merge_pull_request_code(organization, repo, pr_id)
if ans is None:
return
# if the repo has .ce file, it means we should do something before merge
# the code from inter to outer
ce_file = Path(dir + '/.ce')
if ce_file.is_file():
await cmd.shell('bash .ce', dir, job)
else:
await Log(LogType.INFO,
f"There is no .ce file in the project {project.name}", job.id)
# TODO check git diff apply --check
diff, err = await cmd.shell("git diff out_branch", dir, job)
if diff == "":
# The diff is empty, save the commit and return
await cmd.shell('git reset --hard', dir, job)
await service.update_job_lateset_commit(job.id, commit)
return
patch_file = '/tmp/' + job.github_branch + '_patch'
await cmd.shell('rm -rf ' + patch_file, dir, job)
with open(patch_file, "w") as diff_file:
diff, err = await cmd.shell("git diff out_branch", dir, job)
diff_file.write(diff)
await cmd.shell('git reset --hard', dir, job)
await cmd.shell('git checkout out_branch', dir, job)
# git apply --check first
# out, err = await cmd.shell('git apply --check ' + patch_file, dir, job)
if err != "":
raise ValueError(
f"The commit {commit} has conflict to the branch {job.github_branch}")
await cmd.shell('git apply ' + patch_file, dir, job)
await cmd.shell('git add .', dir, job)
await cmd.shell(f"git commit -m \"{content}\"", dir, job)
# TODO:change commit author
out = await author.get_github_author_and_email(domain)
if out['author'] is None or out['email'] is None:
await Log(LogType.ERROR, f"The commit has no correct author or email", job.id)
raise ValueError("That is not a positive author or email")
await Log(LogType.INFO,
f"Get the commit author {out['author']} and email {out['email']}", job.id)
author_info = f"{out['author']} <{out['email']}>"
await cmd.shell(
f"git commit --amend --no-edit --author=\"{author_info}\"", dir, job)
await cmd.shell(f"git pull -r github {job.github_branch}", dir, job)
await cmd.shell(f"git push -u github out_branch:{job.github_branch}", dir, job)
if job.gitee_branch is not None:
await cmd.shell(f"git pull -r gitee {job.gitee_branch}", dir, job)
await cmd.shell(f"git push -u gitee out_branch:{job.gitee_branch}", dir, job)
if job.code_china_branch is not None:
await cmd.shell(f"git pull -r csdn {job.code_china_branch}", dir, job)
await cmd.shell(f"git push -u csdn out_branch:{job.code_china_branch}", dir, job)
await cmd.shell(f"git checkout {job.gitlab_branch}", dir, job)
# save the latest commit
ans = await service.update_job_lateset_commit(job.id, commit)
if ans:
await Log(LogType.INFO,
f"Update the latest commit {commit} successfully", job.id)
except:
msg = f"Sync the commit {commit} of project {project.name} failed"
await Log(LogType.ERROR, msg, job.id)
return
async def sync_job(job: JobDTO):
project_service = ProjectService()
project = await project_service.search_project(name=job.project)
if len(project) == 0:
await Log(LogType.INFO, "There are no projects in the database", job.id)
return
# 1. sync the outer pull request into inter
if job.type == SyncType.OneWay:
await sync_pull_request(project[0], job)
# 2. sync the inter code into outer
await sync_inter_code(project[0], job)
async def sync():
logger.info("Start syncing ****************************")
log_service = LogService()
await log_service.delete_logs()
# fetch the sync job list
service = JobService()
jobs = await service.list_jobs()
if jobs is None:
logger.info(f"There are no sync jobs in the database")
return
logger.info(f"There are {len(jobs)} sync jobs in the database")
tasks = []
for job in jobs:
# if the job status is green, it means we can sync the job
if job.status == Color.green:
await Log(LogType.INFO,
f"The github branch {job.github_branch} from {job.project} is now syncing", job.id)
task = asyncio.create_task(sync_job(job))
tasks.append(task)
else:
await Log(LogType.INFO,
f"The github branch {job.github_branch} from {job.project} does not need to sync", job.id)
for task in tasks:
await task
logger.info("End syncing ****************************")
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(sync())

0
web/.editorconfig Executable file → Normal file
View File

0
web/src/models/global.ts Executable file → Normal file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.