diff options
author | Mathieu Parent <math.parent@gmail.com> | 2019-05-15 15:35:55 +0300 |
---|---|---|
committer | Mathieu Parent <math.parent@gmail.com> | 2019-07-03 17:18:05 +0300 |
commit | 353e68772c8b57ef4a98be094f2674d28a2dedcd (patch) | |
tree | 2bccce84d64aeae32415e7b4231178779825a072 /app/models/concerns/project_api_compatibility.rb | |
parent | 26b7b475586b67c9e9aee7ec7311cca712901dbc (diff) |
Add build_git_strategy attribute to project API
We map the boolean to the string 'fetch' or 'clone', to be more
explicit.
Diffstat (limited to 'app/models/concerns/project_api_compatibility.rb')
-rw-r--r-- | app/models/concerns/project_api_compatibility.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/concerns/project_api_compatibility.rb b/app/models/concerns/project_api_compatibility.rb new file mode 100644 index 00000000000..9a0202c211c --- /dev/null +++ b/app/models/concerns/project_api_compatibility.rb @@ -0,0 +1,10 @@ +# 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 +end |