curl
curl --location --request POST 'https://xxx.coding.net/open-api/CreateGitTag?Action=CreateGitTag' \
--header 'Authorization: token aaaaaaaaaaaaaaaaaaaaaaaaaa' \
--header 'Content-Type: application/json' \
--data-raw '{
"DepotId": "12240327",
"Message": "this is a tag",
"StartPoint": "master",
"TagName": "v1.2.4"
}'
import requests
requests.post("https://xxx.coding.net/open-api/CreateGitTag?Action=CreateGitTag",
headers={"Authorization": "token aaaaaaaaaaaaaaaaaaaaaaaaaa",
"Content-Type": "application/json"},
data={"DepotId": "12240327",
"Message": "this is a tag",
"StartPoint": "master",
"TagName": "v1.2.4"}
)
- name: 打tag
ansible.builtin.uri:
url: "https://xxx.coding.net/open-api/CreateGitTag?Action=CreateGitTag"
method: POST
body_format: json
body:
DepotId: "12240327"
Message: "Release {{ version }}"
StartPoint: "master"
TagName: "v{{ version }}"
return_content: true
headers:
Content-Type: application/json
Authorization: "token {{ lookup('env', 'CODING_TOKEN') }}"