Compare two branches, tags, or commits
GET
/v3/projects/{id}/repository/compareCompare two branches, tags, or commits
请求参数
Path 参数
id
string
必需
The ID of a project
Query 参数
from
string
必需
The commit, branch name, or tag name to start comparison
to
string
必需
The commit, branch name, or tag name to stop comparison
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Compare two branches, tags, or commits
数据结构
Compare two branches, tags, or commits
commit
object (RepoCommit)
可选
Get the commits of a merge request
id
string
可选
short_id
string
可选
title
string
可选
author_name
string
可选
author_email
string
可选
created_at
string
可选
committer_name
string
可选
committer_email
string
可选
message
string
可选
commits
object (RepoCommit)
可选
Get the commits of a merge request
diffs
object (RepoDiff)
可选
old_path
string
可选
new_path
string
可选
a_mode
string
可选
b_mode
string
可选
diff
string
可选
new_file
string
可选
renamed_file
string
可选
deleted_file
string
可选
compare_timeout
string
可选
compare_same_ref
string
可选
示例
{
"commit": {
"id": "string",
"short_id": "string",
"title": "string",
"author_name": "string",
"author_email": "string",
"created_at": "string",
"committer_name": "string",
"committer_email": "string",
"message": "string"
},
"commits": {
"id": "string",
"short_id": "string",
"title": "string",
"author_name": "string",
"author_email": "string",
"created_at": "string",
"committer_name": "string",
"committer_email": "string",
"message": "string"
},
"diffs": {
"old_path": "string",
"new_path": "string",
"a_mode": "string",
"b_mode": "string",
"diff": "string",
"new_file": "string",
"renamed_file": "string",
"deleted_file": "string"
},
"compare_timeout": "string",
"compare_same_ref": "string"
}
最后修改时间: 1 个月前