mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 23:13:15 +00:00
Add an open_pull_request tool that creates a new PR via the GitHub REST API using the triggering user's OAuth token (resolved by login from the dashboard store), so the PR creator is the user rather than open-swe[bot]. Falls back to the GitHub App installation token for GitHub-triggered runs, unmapped users, and bot-token-only deployments. The user token never enters the sandbox: clone/push/comments still go through the bot proxy via gh. The agent is steered to use the tool only for OPENING a new PR; updates (body edits, mark ready) and pasted/existing PRs continue to use gh pr edit. Existing-PR (422) returns the open PR's URL so re-runs don't create duplicates.
43 lines
1.4 KiB
Python
43 lines
1.4 KiB
Python
from .add_finding import add_finding
|
|
from .fetch_url import fetch_url
|
|
from .http_request import http_request
|
|
from .linear_comment import linear_comment
|
|
from .linear_create_issue import linear_create_issue
|
|
from .linear_delete_issue import linear_delete_issue
|
|
from .linear_get_issue import linear_get_issue
|
|
from .linear_get_issue_comments import linear_get_issue_comments
|
|
from .linear_list_teams import linear_list_teams
|
|
from .linear_update_issue import linear_update_issue
|
|
from .list_findings import list_findings
|
|
from .open_pull_request import open_pull_request
|
|
from .publish_review import publish_review
|
|
from .reply_to_finding_thread import reply_to_finding_thread
|
|
from .request_pr_review import request_pr_review
|
|
from .resolve_finding_thread import resolve_finding_thread
|
|
from .slack_read_thread_messages import slack_read_thread_messages
|
|
from .slack_thread_reply import slack_thread_reply
|
|
from .update_finding import update_finding
|
|
from .web_search import web_search
|
|
|
|
__all__ = [
|
|
"add_finding",
|
|
"fetch_url",
|
|
"http_request",
|
|
"linear_comment",
|
|
"linear_create_issue",
|
|
"linear_delete_issue",
|
|
"linear_get_issue",
|
|
"linear_get_issue_comments",
|
|
"linear_list_teams",
|
|
"linear_update_issue",
|
|
"list_findings",
|
|
"open_pull_request",
|
|
"publish_review",
|
|
"request_pr_review",
|
|
"reply_to_finding_thread",
|
|
"resolve_finding_thread",
|
|
"slack_read_thread_messages",
|
|
"slack_thread_reply",
|
|
"update_finding",
|
|
"web_search",
|
|
]
|