Commit 8a49cdc3b44579e64d50973df1a1d075e2766b97
1 parent
8d192adb
Exists in
master
and in
4 other branches
Add milestone API docs to doc/README and views/help/api
Also removes `closed` attribute option from create action.
Showing
4 changed files
with
14 additions
and
4 deletions
Show diff stats
app/views/help/api.html.haml
... | ... | @@ -63,3 +63,13 @@ |
63 | 63 | .file_content.wiki |
64 | 64 | = preserve do |
65 | 65 | = markdown File.read(Rails.root.join("doc", "api", "issues.md")) |
66 | + | |
67 | +%br | |
68 | + | |
69 | +.file_holder#milestones | |
70 | + .file_title | |
71 | + %i.icon-file | |
72 | + Milestones | |
73 | + .file_content.wiki | |
74 | + = preserve do | |
75 | + = markdown File.read(Rails.root.join("doc", "api", "milestones.md")) | ... | ... |
doc/api/README.md
... | ... | @@ -29,3 +29,4 @@ The API uses JSON to serialize data. You don't need to specify `.json` at the en |
29 | 29 | + [Projects](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md) |
30 | 30 | + [Snippets](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/snippets.md) |
31 | 31 | + [Issues](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md) |
32 | ++ [Milestones](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/milestones.md) | ... | ... |
doc/api/milestones.md
... | ... | @@ -34,10 +34,10 @@ POST /projects/:id/milestones |
34 | 34 | Parameters: |
35 | 35 | |
36 | 36 | + `id` (required) - The ID or code name of a project |
37 | ++ `milestone_id` (required) - The ID of a project milestone | |
37 | 38 | + `title` (required) - The title of an milestone |
38 | 39 | + `description` (optional) - The description of the milestone |
39 | 40 | + `due_date` (optional) - The due date of the milestone |
40 | -+ `closed` (optional) - The status of the milestone | |
41 | 41 | |
42 | 42 | ## Edit milestone |
43 | 43 | ... | ... |
lib/api/milestones.rb
... | ... | @@ -33,15 +33,13 @@ module Gitlab |
33 | 33 | # title (required) - The title of the milestone |
34 | 34 | # description (optional) - The description of the milestone |
35 | 35 | # due_date (optional) - The due date of the milestone |
36 | - # closed (optional) - The status of the milestone | |
37 | 36 | # Example Request: |
38 | 37 | # POST /projects/:id/milestones |
39 | 38 | post ":id/milestones" do |
40 | 39 | @milestone = user_project.milestones.new( |
41 | 40 | title: params[:title], |
42 | 41 | description: params[:description], |
43 | - due_date: params[:due_date], | |
44 | - closed: (params[:closed] || false) | |
42 | + due_date: params[:due_date] | |
45 | 43 | ) |
46 | 44 | |
47 | 45 | if @milestone.save |
... | ... | @@ -55,6 +53,7 @@ module Gitlab |
55 | 53 | # |
56 | 54 | # Parameters: |
57 | 55 | # id (required) - The ID or code name of a project |
56 | + # milestone_id (required) - The ID of a project milestone | |
58 | 57 | # title (optional) - The title of a milestone |
59 | 58 | # description (optional) - The description of a milestone |
60 | 59 | # due_date (optional) - The due date of a milestone | ... | ... |