Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_api_compatibility.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 631b2a11e9abc519262d57d7efbea53880b5c4d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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