Commit cfa15d0846e43b72d91ec83384c8d1cefcd1c80c
1 parent
580dfe5a
Exists in
master
and in
4 other branches
Remove default_branch support from API project creation
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
0 additions
and
8 deletions
Show diff stats
doc/api/projects.md
| @@ -213,7 +213,6 @@ Parameters: | @@ -213,7 +213,6 @@ Parameters: | ||
| 213 | 213 | ||
| 214 | + `name` (required) - new project name | 214 | + `name` (required) - new project name |
| 215 | + `description` (optional) - short project description | 215 | + `description` (optional) - short project description |
| 216 | -+ `default_branch` (optional) - 'master' by default | ||
| 217 | + `issues_enabled` (optional) | 216 | + `issues_enabled` (optional) |
| 218 | + `wall_enabled` (optional) | 217 | + `wall_enabled` (optional) |
| 219 | + `merge_requests_enabled` (optional) | 218 | + `merge_requests_enabled` (optional) |
lib/api/projects.rb
| @@ -60,7 +60,6 @@ module API | @@ -60,7 +60,6 @@ module API | ||
| 60 | # Parameters: | 60 | # Parameters: |
| 61 | # name (required) - name for new project | 61 | # name (required) - name for new project |
| 62 | # description (optional) - short project description | 62 | # description (optional) - short project description |
| 63 | - # default_branch (optional) - 'master' by default | ||
| 64 | # issues_enabled (optional) | 63 | # issues_enabled (optional) |
| 65 | # wall_enabled (optional) | 64 | # wall_enabled (optional) |
| 66 | # merge_requests_enabled (optional) | 65 | # merge_requests_enabled (optional) |
| @@ -75,7 +74,6 @@ module API | @@ -75,7 +74,6 @@ module API | ||
| 75 | attrs = attributes_for_keys [:name, | 74 | attrs = attributes_for_keys [:name, |
| 76 | :path, | 75 | :path, |
| 77 | :description, | 76 | :description, |
| 78 | - :default_branch, | ||
| 79 | :issues_enabled, | 77 | :issues_enabled, |
| 80 | :wall_enabled, | 78 | :wall_enabled, |
| 81 | :merge_requests_enabled, | 79 | :merge_requests_enabled, |
spec/requests/api/projects_spec.rb
| @@ -91,7 +91,6 @@ describe API::API do | @@ -91,7 +91,6 @@ describe API::API do | ||
| 91 | it "should assign attributes to project" do | 91 | it "should assign attributes to project" do |
| 92 | project = attributes_for(:project, { | 92 | project = attributes_for(:project, { |
| 93 | description: Faker::Lorem.sentence, | 93 | description: Faker::Lorem.sentence, |
| 94 | - default_branch: 'stable', | ||
| 95 | issues_enabled: false, | 94 | issues_enabled: false, |
| 96 | wall_enabled: false, | 95 | wall_enabled: false, |
| 97 | merge_requests_enabled: false, | 96 | merge_requests_enabled: false, |
| @@ -110,16 +109,13 @@ describe API::API do | @@ -110,16 +109,13 @@ describe API::API do | ||
| 110 | project = attributes_for(:project, { public: true }) | 109 | project = attributes_for(:project, { public: true }) |
| 111 | post api("/projects", user), project | 110 | post api("/projects", user), project |
| 112 | json_response['public'].should be_true | 111 | json_response['public'].should be_true |
| 113 | - | ||
| 114 | end | 112 | end |
| 115 | 113 | ||
| 116 | it "should set a project as private" do | 114 | it "should set a project as private" do |
| 117 | project = attributes_for(:project, { public: false }) | 115 | project = attributes_for(:project, { public: false }) |
| 118 | post api("/projects", user), project | 116 | post api("/projects", user), project |
| 119 | json_response['public'].should be_false | 117 | json_response['public'].should be_false |
| 120 | - | ||
| 121 | end | 118 | end |
| 122 | - | ||
| 123 | end | 119 | end |
| 124 | 120 | ||
| 125 | describe "POST /projects/user/:id" do | 121 | describe "POST /projects/user/:id" do |
| @@ -146,7 +142,6 @@ describe API::API do | @@ -146,7 +142,6 @@ describe API::API do | ||
| 146 | it "should assign attributes to project" do | 142 | it "should assign attributes to project" do |
| 147 | project = attributes_for(:project, { | 143 | project = attributes_for(:project, { |
| 148 | description: Faker::Lorem.sentence, | 144 | description: Faker::Lorem.sentence, |
| 149 | - default_branch: 'stable', | ||
| 150 | issues_enabled: false, | 145 | issues_enabled: false, |
| 151 | wall_enabled: false, | 146 | wall_enabled: false, |
| 152 | merge_requests_enabled: false, | 147 | merge_requests_enabled: false, |