Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
b9b63fc3
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,发现更多精彩内容 >>
提交
b9b63fc3
编写于
8月 29, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1329 from tsigo/milestone_api_docs
Add milestone API docs to doc/README and views/help/api
上级
8d192adb
8a49cdc3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
4 deletion
+14
-4
app/views/help/api.html.haml
app/views/help/api.html.haml
+10
-0
doc/api/README.md
doc/api/README.md
+1
-0
doc/api/milestones.md
doc/api/milestones.md
+1
-1
lib/api/milestones.rb
lib/api/milestones.rb
+2
-3
未找到文件。
app/views/help/api.html.haml
浏览文件 @
b9b63fc3
...
...
@@ -63,3 +63,13 @@
.file_content.wiki
=
preserve
do
=
markdown
File
.
read
(
Rails
.
root
.
join
(
"doc"
,
"api"
,
"issues.md"
))
%br
.file_holder
#milestones
.file_title
%i
.icon-file
Milestones
.file_content.wiki
=
preserve
do
=
markdown
File
.
read
(
Rails
.
root
.
join
(
"doc"
,
"api"
,
"milestones.md"
))
doc/api/README.md
浏览文件 @
b9b63fc3
...
...
@@ -29,3 +29,4 @@ The API uses JSON to serialize data. You don't need to specify `.json` at the en
+
[
Projects
](
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md
)
+
[
Snippets
](
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/snippets.md
)
+
[
Issues
](
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md
)
+
[
Milestones
](
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/milestones.md
)
doc/api/milestones.md
浏览文件 @
b9b63fc3
...
...
@@ -34,10 +34,10 @@ POST /projects/:id/milestones
Parameters:
+
`id`
(required) - The ID or code name of a project
+
`milestone_id`
(required) - The ID of a project milestone
+
`title`
(required) - The title of an milestone
+
`description`
(optional) - The description of the milestone
+
`due_date`
(optional) - The due date of the milestone
+
`closed`
(optional) - The status of the milestone
## Edit milestone
...
...
lib/api/milestones.rb
浏览文件 @
b9b63fc3
...
...
@@ -33,15 +33,13 @@ module Gitlab
# title (required) - The title of the milestone
# description (optional) - The description of the milestone
# due_date (optional) - The due date of the milestone
# closed (optional) - The status of the milestone
# Example Request:
# POST /projects/:id/milestones
post
":id/milestones"
do
@milestone
=
user_project
.
milestones
.
new
(
title:
params
[
:title
],
description:
params
[
:description
],
due_date:
params
[
:due_date
],
closed:
(
params
[
:closed
]
||
false
)
due_date:
params
[
:due_date
]
)
if
@milestone
.
save
...
...
@@ -55,6 +53,7 @@ module Gitlab
#
# Parameters:
# id (required) - The ID or code name of a project
# milestone_id (required) - The ID of a project milestone
# title (optional) - The title of a milestone
# description (optional) - The description of a milestone
# due_date (optional) - The due date of a milestone
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录