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 | 213 | |
| 214 | 214 | + `name` (required) - new project name |
| 215 | 215 | + `description` (optional) - short project description |
| 216 | -+ `default_branch` (optional) - 'master' by default | |
| 217 | 216 | + `issues_enabled` (optional) |
| 218 | 217 | + `wall_enabled` (optional) |
| 219 | 218 | + `merge_requests_enabled` (optional) | ... | ... |
lib/api/projects.rb
| ... | ... | @@ -60,7 +60,6 @@ module API |
| 60 | 60 | # Parameters: |
| 61 | 61 | # name (required) - name for new project |
| 62 | 62 | # description (optional) - short project description |
| 63 | - # default_branch (optional) - 'master' by default | |
| 64 | 63 | # issues_enabled (optional) |
| 65 | 64 | # wall_enabled (optional) |
| 66 | 65 | # merge_requests_enabled (optional) |
| ... | ... | @@ -75,7 +74,6 @@ module API |
| 75 | 74 | attrs = attributes_for_keys [:name, |
| 76 | 75 | :path, |
| 77 | 76 | :description, |
| 78 | - :default_branch, | |
| 79 | 77 | :issues_enabled, |
| 80 | 78 | :wall_enabled, |
| 81 | 79 | :merge_requests_enabled, | ... | ... |
spec/requests/api/projects_spec.rb
| ... | ... | @@ -91,7 +91,6 @@ describe API::API do |
| 91 | 91 | it "should assign attributes to project" do |
| 92 | 92 | project = attributes_for(:project, { |
| 93 | 93 | description: Faker::Lorem.sentence, |
| 94 | - default_branch: 'stable', | |
| 95 | 94 | issues_enabled: false, |
| 96 | 95 | wall_enabled: false, |
| 97 | 96 | merge_requests_enabled: false, |
| ... | ... | @@ -110,16 +109,13 @@ describe API::API do |
| 110 | 109 | project = attributes_for(:project, { public: true }) |
| 111 | 110 | post api("/projects", user), project |
| 112 | 111 | json_response['public'].should be_true |
| 113 | - | |
| 114 | 112 | end |
| 115 | 113 | |
| 116 | 114 | it "should set a project as private" do |
| 117 | 115 | project = attributes_for(:project, { public: false }) |
| 118 | 116 | post api("/projects", user), project |
| 119 | 117 | json_response['public'].should be_false |
| 120 | - | |
| 121 | 118 | end |
| 122 | - | |
| 123 | 119 | end |
| 124 | 120 | |
| 125 | 121 | describe "POST /projects/user/:id" do |
| ... | ... | @@ -146,7 +142,6 @@ describe API::API do |
| 146 | 142 | it "should assign attributes to project" do |
| 147 | 143 | project = attributes_for(:project, { |
| 148 | 144 | description: Faker::Lorem.sentence, |
| 149 | - default_branch: 'stable', | |
| 150 | 145 | issues_enabled: false, |
| 151 | 146 | wall_enabled: false, |
| 152 | 147 | merge_requests_enabled: false, | ... | ... |