Sha256: 9cff32cfff4a85b9b2d9e213c2a25bafa96a90b0c1cc3ce3af08ec31728a55ae

Contents?: true

Size: 841 Bytes

Versions: 5

Compression:

Stored size: 841 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'yaml'
require_relative '../lib/gitlab/triage/option_parser'
require_relative '../lib/gitlab/triage/engine'
require_relative '../lib/gitlab/triage/ui'

options = Gitlab::Triage::OptionParser.parse(ARGV)
options.policies_files << '.triage-policies.yml' if options.policies_files.empty?

options.policies_files.each do |policies_file|
  policies = if Psych::VERSION >= '4.0'
               HashWithIndifferentAccess.new(YAML.load_file(policies_file, aliases: true))
             else
               HashWithIndifferentAccess.new(YAML.load_file(policies_file))
             end

  policy_engine = Gitlab::Triage::Engine
    .new(policies: policies, options: options)

  puts Gitlab::Triage::UI.header("Executing policies from #{policies_file}.", char: '*')
  policy_engine.perform
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gitlab-triage-1.44.1 bin/gitlab-triage
gitlab-triage-1.44.0 bin/gitlab-triage
gitlab-triage-1.43.2 bin/gitlab-triage
gitlab-triage-1.43.1 bin/gitlab-triage
gitlab-triage-1.43.0 bin/gitlab-triage