Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
f6a666bd
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f6a666bd
编写于
2月 08, 2016
作者:
R
Rémy Coutable
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add an API spec for MergeRequest#merge_status and properly document this resource
上级
86d15c1e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
117 addition
and
11 deletion
+117
-11
CHANGELOG
CHANGELOG
+1
-0
doc/api/merge_requests.md
doc/api/merge_requests.md
+115
-11
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+1
-0
未找到文件。
CHANGELOG
浏览文件 @
f6a666bd
...
...
@@ -24,6 +24,7 @@ v 8.5.0 (unreleased)
- Update the ExternalIssue regex pattern (Blake Hitchcock)
- Remember user's inline/side-by-side diff view preference in a cookie (Kirill Katsnelson)
- Optimized performance of finding issues to be closed by a merge request
- API: Expose MergeRequest#merge_status (Andrei Dziahel)
- Revert "Add IP check against DNSBLs at account sign-up"
- Fix API to keep request parameters in Link header (Michael Potthoff)
- Deprecate API "merge_request/:merge_request_id/comments". Use "merge_requests/:merge_request_id/notes" instead
...
...
doc/api/merge_requests.md
浏览文件 @
f6a666bd
...
...
@@ -2,7 +2,7 @@
## List merge requests
Get all merge requests for this project.
Get all merge requests for this project.
The
`state`
parameter can be used to get only merge requests with a given state (
`opened`
,
`closed`
, or
`merged`
) or all of them (
`all`
).
The pagination parameters
`page`
and
`per_page`
can be used to restrict the list of merge requests.
...
...
@@ -49,8 +49,24 @@ Parameters:
"state"
:
"active"
,
"created_at"
:
"2012-04-29T08:46:00Z"
},
"source_project_id"
:
"2"
,
"target_project_id"
:
"3"
,
"labels"
:
[
],
"description"
:
"fixed login page css paddings"
,
"work_in_progress"
:
false
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
"project_id"
:
3
,
"title"
:
"v2.0"
,
"description"
:
"Assumenda aut placeat expedita exercitationem labore sunt enim earum."
,
"state"
:
"closed"
,
"created_at"
:
"2015-02-02T19:49:26.013Z"
,
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
}
]
```
...
...
@@ -95,8 +111,24 @@ Parameters:
"state"
:
"active"
,
"created_at"
:
"2012-04-29T08:46:00Z"
},
"source_project_id"
:
"2"
,
"target_project_id"
:
"3"
,
"labels"
:
[
],
"description"
:
"fixed login page css paddings"
,
"work_in_progress"
:
false
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
"project_id"
:
3
,
"title"
:
"v2.0"
,
"description"
:
"Assumenda aut placeat expedita exercitationem labore sunt enim earum."
,
"state"
:
"closed"
,
"created_at"
:
"2015-02-02T19:49:26.013Z"
,
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
}
```
...
...
@@ -156,8 +188,6 @@ Parameters:
"iid"
:
1
,
"project_id"
:
4
,
"title"
:
"Blanditiis beatae suscipit hic assumenda et molestias nisi asperiores repellat et."
,
"description"
:
"Qui voluptatibus placeat ipsa alias quasi. Deleniti rem ut sint. Optio velit qui distinctio."
,
"work_in_progress"
:
false
,
"state"
:
"reopened"
,
"created_at"
:
"2015-02-02T19:49:39.159Z"
,
"updated_at"
:
"2015-02-02T20:08:49.959Z"
,
...
...
@@ -182,6 +212,8 @@ Parameters:
"source_project_id"
:
4
,
"target_project_id"
:
4
,
"labels"
:
[
],
"description"
:
"Qui voluptatibus placeat ipsa alias quasi. Deleniti rem ut sint. Optio velit qui distinctio."
,
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
...
...
@@ -193,6 +225,8 @@ Parameters:
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
,
"changes"
:
[
{
"old_path"
:
"VERSION"
,
...
...
@@ -252,7 +286,24 @@ Parameters:
"state"
:
"active"
,
"created_at"
:
"2012-04-29T08:46:00Z"
},
"description"
:
"fixed login page css paddings"
"source_project_id"
:
4
,
"target_project_id"
:
4
,
"labels"
:
[
],
"description"
:
"fixed login page css paddings"
,
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
"project_id"
:
4
,
"title"
:
"v2.0"
,
"description"
:
"Assumenda aut placeat expedita exercitationem labore sunt enim earum."
,
"state"
:
"closed"
,
"created_at"
:
"2015-02-02T19:49:26.013Z"
,
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
}
```
...
...
@@ -284,7 +335,6 @@ Parameters:
"target_branch"
:
"master"
,
"project_id"
:
3
,
"title"
:
"test1"
,
"description"
:
"description1"
,
"state"
:
"opened"
,
"upvotes"
:
0
,
"downvotes"
:
0
,
...
...
@@ -303,7 +353,25 @@ Parameters:
"name"
:
"Administrator"
,
"state"
:
"active"
,
"created_at"
:
"2012-04-29T08:46:00Z"
}
},
"source_project_id"
:
4
,
"target_project_id"
:
4
,
"labels"
:
[
],
"description"
:
"description1"
,
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
"project_id"
:
4
,
"title"
:
"v2.0"
,
"description"
:
"Assumenda aut placeat expedita exercitationem labore sunt enim earum."
,
"state"
:
"closed"
,
"created_at"
:
"2015-02-02T19:49:26.013Z"
,
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
}
```
...
...
@@ -359,7 +427,25 @@ Parameters:
"name"
:
"Administrator"
,
"state"
:
"active"
,
"created_at"
:
"2012-04-29T08:46:00Z"
}
},
"source_project_id"
:
4
,
"target_project_id"
:
4
,
"labels"
:
[
],
"description"
:
"fixed login page css paddings"
,
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
"project_id"
:
4
,
"title"
:
"v2.0"
,
"description"
:
"Assumenda aut placeat expedita exercitationem labore sunt enim earum."
,
"state"
:
"closed"
,
"created_at"
:
"2015-02-02T19:49:26.013Z"
,
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
}
```
...
...
@@ -387,7 +473,7 @@ Parameters:
"source_branch"
:
"test1"
,
"project_id"
:
3
,
"title"
:
"test1"
,
"state"
:
"
merg
ed"
,
"state"
:
"
open
ed"
,
"upvotes"
:
0
,
"downvotes"
:
0
,
"author"
:
{
...
...
@@ -405,7 +491,25 @@ Parameters:
"name"
:
"Administrator"
,
"state"
:
"active"
,
"created_at"
:
"2012-04-29T08:46:00Z"
}
},
"source_project_id"
:
4
,
"target_project_id"
:
4
,
"labels"
:
[
],
"description"
:
"fixed login page css paddings"
,
"work_in_progress"
:
false
,
"milestone"
:
{
"id"
:
5
,
"iid"
:
1
,
"project_id"
:
4
,
"title"
:
"v2.0"
,
"description"
:
"Assumenda aut placeat expedita exercitationem labore sunt enim earum."
,
"state"
:
"closed"
,
"created_at"
:
"2015-02-02T19:49:26.013Z"
,
"updated_at"
:
"2015-02-02T19:49:26.013Z"
,
"due_date"
:
null
},
"merge_when_build_succeeds"
:
true
,
"merge_status"
:
"can_be_merged"
}
```
...
...
spec/requests/api/merge_requests_spec.rb
浏览文件 @
f6a666bd
...
...
@@ -115,6 +115,7 @@ describe API::API, api: true do
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
json_response
[
'title'
]).
to
eq
(
merge_request
.
title
)
expect
(
json_response
[
'iid'
]).
to
eq
(
merge_request
.
iid
)
expect
(
json_response
[
'merge_status'
]).
to
eq
(
'can_be_merged'
)
end
it
'should return merge_request by iid'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录