Class: SupplyChain

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

Instance Method Summary collapse

Constructor Details

#initialize(token: nil) ⇒ SupplyChain

Returns a new instance of SupplyChain.



7
8
9
10
# File 'lib/supply_chain.rb', line 7

def initialize(token: nil)
    @token = token || ENV["GITHUB_TOKEN"]
    @cache = {}
end

Instance Method Details

#analyze(workflows) ⇒ Object



12
13
14
15
# File 'lib/supply_chain.rb', line 12

def analyze(workflows)
    actions = extract_actions(workflows)
    actions.map { |a| enrich(a) }
end