Class: Agentilda::Linear::Push
- Inherits:
-
Object
- Object
- Agentilda::Linear::Push
- Defined in:
- lib/agentilda/linear/push.rb
Overview
Applies an Import through the API, then writes each plan's
linear.md so the next run knows what this one did.
Plans are pushed one at a time and in order. There is no concurrency here on purpose: within a plan the folder's own issue must exist before its children can name it as their parent, and across plans the gain would be a few seconds against the risk of two threads racing to create the same label on a team that does not have it yet.
Instance Method Summary collapse
-
#call ⇒ Array<Agentilda::Linear::Result>
Every action attempted, skips included, in plan order.
-
#initialize(import:, api:, tree:) ⇒ Push
constructor
A new instance of Push.
Constructor Details
#initialize(import:, api:, tree:) ⇒ Push
Returns a new instance of Push.
32 33 34 35 36 |
# File 'lib/agentilda/linear/push.rb', line 32 def initialize(import:, api:, tree:) @import = import @api = api @tree = tree end |
Instance Method Details
#call ⇒ Array<Agentilda::Linear::Result>
Returns every action attempted, skips included, in plan order.
40 41 42 |
# File 'lib/agentilda/linear/push.rb', line 40 def call import.actions.group_by(&:ordinal).flat_map { |ordinal, actions| push_plan(ordinal, actions) } end |