qdyxmas's Room

Done is better than perfect...

gitlab更新集成测试结果信息

import requests


url = "https://gitlab.com/api/v4/projects/12203068/statuses/d851146c6f0199ec8f008f7e06a11bd625ace826"
headers = {"PRIVATE-TOKEN":"W2nduPyTaQEzyXxpQ72W"}
data = {
      "state": "success",
      "target_url": "http://xkooltest.3322.org:9191/report",
      "description": "{Pass:100,Fail:100,Error:100,Skip:100}",
      "context": "Unit Test Result"
    }
req = requests.post(url,json=data,headers=headers)
print(req.content)

标签 

评论