比如通过 web 触发,主动去 gitlab 拉代码,和本地文件同步,只是增量更新,不是文件下载。我看了看 http api 或者 gitlab-python 好像都不能实现这个功能,大家有啥思路吗?
1
Vegetable 2021 年 4 月 1 日 阿这,难道不能这样?
os.system("git pull") |
2
wayslog 2021 年 4 月 1 日
subprocess.check_call(shlex.split('git pull ....'))
|
3
Misakas 2021 年 4 月 2 日
os.system("cd /home/workspace/ && git pull ")。楼上的都不严谨(狗头
|
4
tingyunsay 2021 年 4 月 2 日
import commands
commands.getstatusoutput("/usr/bin/git pull") |