Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
b9b63fc3
Commit
b9b63fc3
authored
Aug 29, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1329 from tsigo/milestone_api_docs
Add milestone API docs to doc/README and views/help/api
parents
8d192adb
8a49cdc3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+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
No files found.
app/views/help/api.html.haml
View file @
b9b63fc3
...
@@ -63,3 +63,13 @@
...
@@ -63,3 +63,13 @@
.file_content.wiki
.file_content.wiki
=
preserve
do
=
preserve
do
=
markdown
File
.
read
(
Rails
.
root
.
join
(
"doc"
,
"api"
,
"issues.md"
))
=
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
View file @
b9b63fc3
...
@@ -29,3 +29,4 @@ The API uses JSON to serialize data. You don't need to specify `.json` at the en
...
@@ -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
)
+
[
Projects
](
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md
)
+
[
Snippets
](
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/snippets.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
)
+
[
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
View file @
b9b63fc3
...
@@ -34,10 +34,10 @@ POST /projects/:id/milestones
...
@@ -34,10 +34,10 @@ POST /projects/:id/milestones
Parameters:
Parameters:
+
`id`
(required) - The ID or code name of a project
+
`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
+
`title`
(required) - The title of an milestone
+
`description`
(optional) - The description of the milestone
+
`description`
(optional) - The description of the milestone
+
`due_date`
(optional) - The due date of the milestone
+
`due_date`
(optional) - The due date of the milestone
+
`closed`
(optional) - The status of the milestone
## Edit milestone
## Edit milestone
...
...
lib/api/milestones.rb
View file @
b9b63fc3
...
@@ -33,15 +33,13 @@ module Gitlab
...
@@ -33,15 +33,13 @@ module Gitlab
# title (required) - The title of the milestone
# title (required) - The title of the milestone
# description (optional) - The description of the milestone
# description (optional) - The description of the milestone
# due_date (optional) - The due date of the milestone
# due_date (optional) - The due date of the milestone
# closed (optional) - The status of the milestone
# Example Request:
# Example Request:
# POST /projects/:id/milestones
# POST /projects/:id/milestones
post
":id/milestones"
do
post
":id/milestones"
do
@milestone
=
user_project
.
milestones
.
new
(
@milestone
=
user_project
.
milestones
.
new
(
title:
params
[
:title
],
title:
params
[
:title
],
description:
params
[
:description
],
description:
params
[
:description
],
due_date:
params
[
:due_date
],
due_date:
params
[
:due_date
]
closed:
(
params
[
:closed
]
||
false
)
)
)
if
@milestone
.
save
if
@milestone
.
save
...
@@ -55,6 +53,7 @@ module Gitlab
...
@@ -55,6 +53,7 @@ module Gitlab
#
#
# Parameters:
# Parameters:
# id (required) - The ID or code name of a project
# 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
# title (optional) - The title of a milestone
# description (optional) - The description of a milestone
# description (optional) - The description of a milestone
# due_date (optional) - The due date of a milestone
# due_date (optional) - The due date of a milestone
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment