创建一个仓库的Tag
POST/api/v5/repos/:owner/:repo/tags
Request
Path Parameters
owner stringrequired
仓库所属空间地址(组织或个人的地址path)
repo stringrequired
仓库路径(path)
Query Parameters
access_token stringrequired
用户授权码
- application/json
Body
refsstringrequired
起点名称,默认main
tag_namestringrequired
新创建的标签名称
tag_messagestring
Tag 描述,默认为空
Responses
- 200
成功响应
Response Headers
- application/json
- Schema
- Example (auto)
- 1
Schema
namestring
messagestring
commit object
shastring
datestring
taggernull
{
"name": "string",
"message": "string",
"commit": {
"sha": "string",
"date": "string"
}
}
成功示例
{
"name": "tag2",
"message": "",
"commit": {
"sha": "5d165dae3b073d3e92ca91c3edcb21994361462c",
"date": "2024-04-08T13:13:33+00:00"
},
"tagger": null
}