2019-05-15 08:35:55 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Add methods used by the projects API
|
|
|
|
module ProjectAPICompatibility
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def build_git_strategy=(value)
|
|
|
|
write_attribute(:build_allow_git_fetch, value == 'fetch')
|
|
|
|
end
|
2019-05-15 10:27:54 -04:00
|
|
|
|
|
|
|
def auto_devops_enabled=(value)
|
2019-07-19 17:39:26 -04:00
|
|
|
(auto_devops || build_auto_devops).enabled = value
|
2019-05-15 10:27:54 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def auto_devops_deploy_strategy=(value)
|
2019-07-19 17:39:26 -04:00
|
|
|
(auto_devops || build_auto_devops).deploy_strategy = value
|
2019-05-15 10:27:54 -04:00
|
|
|
end
|
2019-05-15 08:35:55 -04:00
|
|
|
end
|