capability_id: pr.assignees.remove
version: "1.0.0"
description: Remove specific assignees from a pull request.
input_schema:
  type: object
  required: [owner, name, prNumber, assignees]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    prNumber: { type: integer, minimum: 1 }
    assignees:
      type: array
      items: { type: string, minLength: 1 }
      minItems: 1
  additionalProperties: false
output_schema:
  type: object
  required: [prNumber, removed]
  properties:
    prNumber: { type: integer, minimum: 1 }
    removed:
      type: array
      items: { type: string }
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: [cli]
graphql:
  operationName: PrAssigneesRemove
  operationType: mutation
  documentPath: src/gql/operations/pr-assignees-remove.graphql
  resolution:
    lookup:
      operationName: PrAssigneesLookupByNumber
      documentPath: src/gql/operations/pr-assignees-lookup-by-number.graphql
      vars:
        owner: owner
        name: name
        prNumber: prNumber
    inject:
      - target: assignableId
        source: scalar
        path: repository.pullRequest.id
      - target: assigneeIds
        source: map_array
        from_input: assignees
        nodes_path: repository.assignableUsers.nodes
        match_field: login
        extract_field: id
cli:
  command: pr edit
