open-swe/agent/middleware
Johannes du Plessis 6ef70823be
fix(open_pr): reuse config for GitHub token; defer installation token lookup (#1227)
Calling get_github_token() without arguments always invoked LangGraph get_config internally,
which broke tests that only patch agent.middleware.open_pr.get_config and failed outside
runnable context.

Extend get_github_token with an optional runnable config mapping; the middleware passes
the config dict already resolved from get_config(). Request GitHub App installation tokens
only after detecting sandbox/repo changes worth publishing.

Fixes failing Agent unit tests in tests/test_open_pr_middleware.py.
2026-04-30 17:48:15 -07:00
..
__init__.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
check_message_queue.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
ensure_no_empty_msg.py fix: skip no_op injection when PR is committed and user is notified (#1047) 2026-03-10 12:56:44 -07:00
open_pr.py fix(open_pr): reuse config for GitHub token; defer installation token lookup (#1227) 2026-04-30 17:48:15 -07:00
tool_error_handler.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00