Sha256: 0ebec233d20d1400cc7e41c12b0a2b85317ea39c402891d3f4acd9da5f84de74
Contents?: true
Size: 470 Bytes
Versions: 3
Compression:
Stored size: 470 Bytes
Contents
# frozen_string_literal: true require_relative "spin" module Gitlab module Dangerfiles Approval = Struct.new(:category, :spin) do def self.from_approval_rule(rule, maintainer) category = if rule["section"] == "codeowners" "`#{rule['name']}`" else rule["section"] end.to_sym spin = Spin.new(category, nil, maintainer, :reviewer) new(category, spin) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gitlab-dangerfiles-4.8.1 | lib/gitlab/dangerfiles/approval.rb |
gitlab-dangerfiles-4.8.0 | lib/gitlab/dangerfiles/approval.rb |
gitlab-dangerfiles-4.7.0 | lib/gitlab/dangerfiles/approval.rb |