Class: LinearToonMcp::Tools::DeleteStatusUpdate
- Defined in:
- lib/linear_toon_mcp/tools/delete_status_update.rb
Overview
Archive a status update by id. Linear has no hard-delete mutation for status updates — archiving is the canonical “delete” operation. Determines the parent type (project vs initiative) by lookup, then calls the corresponding archive mutation.
Constant Summary collapse
- PROJECT_ARCHIVE_MUTATION =
<<~GRAPHQL mutation($id: String!) { projectUpdateArchive(id: $id) { success entity { id archivedAt } } } GRAPHQL
- INITIATIVE_ARCHIVE_MUTATION =
<<~GRAPHQL mutation($id: String!) { initiativeUpdateArchive(id: $id) { success entity { id archivedAt } } } GRAPHQL
Instance Method Summary collapse
Methods inherited from Base
call, #call, error_response, success_response
Instance Method Details
#perform(id:) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/linear_toon_mcp/tools/delete_status_update.rb', line 38 def perform(id:) update = GetStatusUpdate.new.perform(id: id) if update.key?("project") archive(PROJECT_ARCHIVE_MUTATION, "projectUpdateArchive", id) else archive(INITIATIVE_ARCHIVE_MUTATION, "initiativeUpdateArchive", id) end end |