Commit Graph

4 Commits

Author SHA1 Message Date
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
Nick Thomas a5a444906d Fix the project auto devops API
If `project_auto_devops.enabled` is nil for a project, when setting any
auto devops values via the API, we try to create a new row in the DB,
instead of re-using the existing one. This leads to the project_id
being set to nil, and the database `NOT NULL` constraint leading to a
500 response.

This commit resolves the issue by correctly detecting the presence of a
ProjectAutoDevops row and re-using it. Persistence is also moved away
from explicit `update!` calls and into relying on `autosave: true` on
the model.
2019-07-19 21:39:26 +00:00
Mathieu Parent e44167004d Add auto_devops_* to project API
The auto_devops object sometimes doesn't exists. We may need to create
it.
2019-07-03 16:18:05 +02:00
Mathieu Parent 353e68772c Add build_git_strategy attribute to project API
We map the boolean to the string 'fetch' or 'clone', to be more
explicit.
2019-07-03 16:18:05 +02:00