Fix: Reduce log noise for optional org-level .openhands repositories (#12456)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Graham Neubig
2026-01-15 18:27:34 -05:00
committed by GitHub
parent 6e4ac8e2ce
commit f5315887ec
6 changed files with 26 additions and 8 deletions

View File

@@ -23,8 +23,16 @@ class UserContext(ABC):
"""Get the user info."""
@abstractmethod
async def get_authenticated_git_url(self, repository: str) -> str:
"""Get the provider tokens for the user"""
async def get_authenticated_git_url(
self, repository: str, is_optional: bool = False
) -> str:
"""Get an authenticated git URL for a repository.
Args:
repository: Repository name (owner/repo)
is_optional: If True, logs at debug level instead of error level
when repository is not found. Use for optional repositories.
"""
@abstractmethod
async def get_provider_tokens(self) -> PROVIDER_TOKEN_TYPE | None: