debian-mirror-gitlab/app/models/concerns/project_api_compatibility.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
447 B
Ruby
Raw Normal View History

2019-09-30 21:07:59 +05:30
# 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
def auto_devops_enabled=(value)
(auto_devops || build_auto_devops).enabled = value
end
def auto_devops_deploy_strategy=(value)
(auto_devops || build_auto_devops).deploy_strategy = value
end
end