open-swe/agent/tools/linear_search_issues.py
Adam Moussa db05d5826f
Some checks are pending
CI / Lint (push) Waiting to run
CI / Format check (push) Waiting to run
CI / Typecheck (push) Waiting to run
CI / Unit tests (push) Waiting to run
CI / Playwright E2E (push) Waiting to run
CI / Docker build smoke (push) Waiting to run
CI / Triage ledger up to date (push) Waiting to run
CI / ui bun.lock in sync (push) Waiting to run
feat(open-swe): port upstream clean batch (#1775, #1785, #1789) (#215)
* Fix: Fix Improper privilege management in server.py (#1789)

Co-authored-by: corridor-security[bot] <203152403+corridor-security[bot]@users.noreply.github.com>
(cherry picked from commit 3ea29d3f231dd66bd7627769b5659564be4525df)

* Fix: Fix Stored XSS in ReplyCard.tsx (#1785)

Co-authored-by: corridor-security[bot] <203152403+corridor-security[bot]@users.noreply.github.com>
(cherry picked from commit 31263f832a2ecedf669eee2e27b827a358a6a4d7)

* feat: add structured Linear issue filters (#1775)

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
(cherry picked from commit b5e529252c3012818289eca1b1cdeb8014721310)

* chore(triage): mark #1775 #1785 #1789 landed

Move the three clean cherry-picks in this batch from deferred to landed
in the upstream-sync ledger and re-render triage.md.

---------

Co-authored-by: corridor-security[bot] <203152403+corridor-security[bot]@users.noreply.github.com>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-07-20 19:54:16 +00:00

37 lines
1.2 KiB
Python

from typing import Any
from ..utils.linear import search_issues
async def linear_search_issues(
query: str | None = None,
team_id: str | None = None,
filters: dict[str, Any] | None = None,
limit: int = 10,
include_archived: bool = False,
include_comments: bool = False,
after: str | None = None,
) -> dict[str, Any]:
"""Search Linear issues by text, structured filters, or both.
Args:
query: Optional free-text query over issue content.
team_id: Optional team UUID used to restrict matches to that team.
filters: Optional Linear IssueFilter object for labels, state, project, assignee, and more.
limit: Maximum results to return, from 1 to 50.
include_archived: Whether to include archived issues.
include_comments: Whether free-text search includes issue comments.
after: Optional pagination cursor from a previous result's page_info.endCursor.
Returns:
Matching issues plus total_count and page_info for pagination.
"""
return await search_issues(
query=query,
team_id=team_id,
filters=filters,
limit=limit,
include_archived=include_archived,
include_comments=include_comments,
after=after,
)