capability_id: project_v2.items.issue.remove
version: "1.0.0"
description: Remove an issue from a Projects v2 project.
input_schema:
  type: object
  required: [owner, projectNumber, itemId]
  properties:
    owner: { type: string, minLength: 1 }
    projectNumber: { type: integer, minimum: 1 }
    itemId: { type: string, minLength: 1 }
  additionalProperties: false
output_schema:
  type: object
  required: [deletedItemId]
  properties:
    deletedItemId: { type: string, minLength: 1 }
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: [cli]
graphql:
  operationName: RemoveProjectV2Item
  operationType: mutation
  documentPath: src/gql/operations/project-v2-item-remove.graphql
  resolution:
    lookups:
      - id: projectOwner
        operationName: ProjectV2OwnerId
        documentPath: src/gql/operations/project-v2-owner-id.graphql
        vars:
          owner: owner
          projectNumber: projectNumber
    inject:
      - target: projectId
        source: scalar
        from_lookup: projectOwner
        path: repositoryOwner.projectV2.id
cli:
  command: project item-delete
