Class: CiToolkit::BuildTypes

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_toolkit/build_types.rb

Overview

util class to get actual valid list of build types

Instance Method Summary collapse

Instance Method Details

#get_build_types(build_types_arr, comments, labels) ⇒ Object

get actual valid list of build types



7
8
9
10
11
12
13
14
15
16
# File 'lib/ci_toolkit/build_types.rb', line 7

def get_build_types(build_types_arr, comments, labels)
  types = []
  build_types_arr.each do |type|
    if comments.include?("#{type} build") || labels.include?("#{type} build") ||
       comments.include?(type) || labels.include?(type)
      types.push(type)
    end
  end
  types
end