Commit 2753fe6d authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'initialize-projects-with-readme' into 'master'

Initialize projects with readme

See merge request gitlab-org/gitlab-ce!21617
parents d12c81cc 175f689e
title: Adds a initialize_with_readme parameter to POST /projects
merge_request: 21617
author: Steve
type: added
......@@ -661,6 +661,7 @@ POST /projects
| `avatar` | mixed | no | Image file for avatar of the project |
| `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line |
| `ci_config_path` | string | no | The path to CI config file |
| `initialize_with_readme` | boolean | no | `false` by default |
## Create project for user
......@@ -26,6 +26,7 @@ module ProjectsHelpers
optional :avatar, type: File, desc: 'Avatar image for project'
optional :printing_merge_request_link_enabled, type: Boolean, desc: 'Show link to create/view merge request when pushing from the command line'
optional :merge_method, type: String, values: %w(ff rebase_merge merge), desc: 'The merge method used when merging merge requests'
optional :initialize_with_readme, type: Boolean, desc: "Initialize a project with a"
params :optional_project_params do
......@@ -557,6 +557,14 @@
expect(json_response['visibility']).to eq('private')
it 'creates a new project initialized with a' do
project = attributes_for(:project, initialize_with_readme: 1, name: 'somewhere')
post api('/projects', user), project
expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/blob/master/")
it 'sets tag list to a project' do
project = attributes_for(:project, tag_list: %w[tagFirst tagSecond])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment