【Python】调用gitlab-api创建pipline Xin Chen 2018-02-27 python 调用gitlab-api创建pipline官网api: 1234POST /projects/:id/pipelinecurl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipeline?ref=master" python 3.X执行脚本: 12345678910# -*- coding: utf-8 -*-import requestsurl = "https://gitlab.com/api/v4/projects/4096120/pipeline?ref=master"header_dict = {'PRIVATE-TOKEN': '9koXpg98eAheJpvBs5tK'}res = requests.post(url=url, headers=header_dict)print(res)# 201 成功 print(res.status_code)