Post status to a commit
POST
/v3/projects/{id}/statuses/{sha}Post status to a commit
请求参数
Path 参数
id
string
必需
The ID of a project
sha
string
必需
The commit hash
Body 参数application/x-www-form-urlencoded
state
enum<string>
必需
The state of the status
枚举值:
pendingrunningsuccessfailedcanceled
ref
string
The ref
target_url
string
可选
The target URL to associate with this status
description
string
可选
A short description of the status
name
string
可选
A string label to differentiate this status from the status of other systems. Default: "default"
context
string
可选
A string label to differentiate this status from the status of other systems. Default: "default"
示例代码
返回响应
成功(201)
HTTP 状态码: 201
内容格式: JSONapplication/json
Post status to a commit
数据结构
Post status to a commit
id
string
可选
sha
string
可选
ref
string
可选
status
string
可选
name
string
可选
target_url
string
可选
description
string
可选
created_at
string
可选
started_at
string
可选
finished_at
string
可选
allow_failure
string
可选
author
object (UserBasic)
可选
Get a single user
name
string
可选
username
string
可选
id
string
可选
state
string
可选
avatar_url
string
可选
web_url
string
可选
示例
{
"id": "string",
"sha": "string",
"ref": "string",
"status": "string",
"name": "string",
"target_url": "string",
"description": "string",
"created_at": "string",
"started_at": "string",
"finished_at": "string",
"allow_failure": "string",
"author": {
"name": "string",
"username": "string",
"id": "string",
"state": "string",
"avatar_url": "string",
"web_url": "string"
}
}
最后修改时间: 1 个月前