diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | lib/api/projects.rb | 4 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 2 |
3 files changed, 4 insertions, 3 deletions
@@ -12,6 +12,7 @@ v7.12.0 - Fix re-adding project with the same name but different gitlab_id - Implementation of Lint (.gitlab-ci.yml validation tool) - Updated rails to 4.1.11 + - API fix: project create call v7.11.0 - Deploy Jobs API calls diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 3ca099a..0311c56 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -81,13 +81,13 @@ module API # Example Request: # POST /projects post do - required_attributes! [:name, :gitlab_id, :gitlab_url, :ssh_url_to_repo] + required_attributes! [:name, :gitlab_id, :ssh_url_to_repo] filtered_params = { name: params[:name], gitlab_id: params[:gitlab_id], # we accept gitlab_url for backward compatibility for a while (added to 7.11) - path: params[:post] || params[:gitlab_url].sub(/.*\/(.*\/.*)$/, '\1'), + path: params[:path] || params[:gitlab_url].sub(/.*\/(.*\/.*)$/, '\1'), default_ref: params[:default_ref] || 'master', ssh_url_to_repo: params[:ssh_url_to_repo] } diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 7cdd3f4..014a9ef 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -167,7 +167,7 @@ describe API::API do { name: "My project", gitlab_id: 1, - gitlab_url: "http://example.com/testing/testing", + path: "testing/testing", ssh_url_to_repo: "ssh://example.com/testing/testing.git" } } |