59 Star 651 Fork 98

GVP星火计划 Project Spark/星火应用商店 Spark-Store

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
callback.py 788 Bytes
一键复制 编辑 原始数据 按行查看 历史
import os
import requests
import json
# sha=os.system("git rev-parse HEAD")
sha = os.getenv("GIT_COMMIT")
# sha = '48fed26c51a8c42554e45f72f43e49703e04c97f'
#get sha from environment
url = "https://gitee.com/api/v5/repos/spark-store-project/spark-store/commits/{}/comments".format(sha)
token = os.getenv("gitee_token")
# process = os.popen("git symbolic-ref --short -q HEAD")
body = "构建详情请见" + os.getenv("JENKINS_URL") + "blue/organizations/jenkins/" + os.getenv("JOB_NAME").replace("/", "/detail/") + "/" + str(os.getenv("BUILD_ID"))
# process.close()
d = {
'access_token': token,
"body": body
}
h = {
"Content-Type": "application/json;charset=UTF-8"
}
res = requests.post(url,headers=h, data=json.dumps(d))
# print(res.status_code)
# print(res.content)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/spark-store-project/spark-store.git
git@gitee.com:spark-store-project/spark-store.git
spark-store-project
spark-store
星火应用商店 Spark-Store
Thunder

搜索帮助