open-swe/agent/tools/linear_comment.py
Johannes du Plessis 96774f20ae
feat: move github workflows to gh cli (#1238)
* feat: move github workflows to gh cli

Use LangSmith proxy auth to support gh-driven GitHub workflows while removing custom GitHub wrapper tools.

* docker ignore + snapshot and docker image updates

* updated image and instructions

* removing open_pr if needed after agent call
2026-05-04 18:03:53 -07:00

26 lines
962 B
Python

import asyncio
from typing import Any
from ..utils.linear import comment_on_linear_issue
def linear_comment(comment_body: str, ticket_id: str) -> dict[str, Any]:
"""Post a comment to a Linear issue.
Use this tool to communicate progress and completion to stakeholders on Linear.
**When to use:**
- After opening/updating a draft PR, post a comment on the Linear ticket to let
stakeholders know the task is complete and include the PR link. For example:
"I've completed the implementation and opened a PR: <pr_url>"
- When answering a question or sharing an update (no code changes needed).
Args:
comment_body: Markdown-formatted comment text to post to the Linear issue.
ticket_id: The Linear issue UUID to post the comment to.
Returns:
Dictionary with 'success' (bool) key.
"""
success = asyncio.run(comment_on_linear_issue(ticket_id, comment_body))
return {"success": success}