Bug
AzureDevopsProvider.get_repo_settings (pr_agent/git_providers/azuredevops_provider.py) calls azure_devops_client.get_item_content(...) which returns a streamed iterator of byte chunks, then keeps only list(contents)[0]. For any .pr_agent.toml larger than a single chunk the file is silently truncated and config keys after the cutoff are lost.
Current code
def get_repo_settings(self):
try:
contents = self.azure_devops_client.get_item_content(
repository_id=self.repo_slug,
project=self.workspace_slug,
download=False,
include_content_metadata=False,
include_content=True,
path=".pr_agent.toml",
)
return list(contents)[0]
except Exception as e:
get_logger().error(f"Failed to get repo settings, error: {e}")
return ""
Repro
Push a .pr_agent.toml large enough to span more than one stream chunk to an Azure DevOps repo. Sections at the bottom of the file are silently ignored — extra_instructions, pr_reviewer overrides, etc., behave as if not set even though the file is committed.
Suggested fix
Join over the full iterator:
return b"".join(list(contents))
Environment
- pr-agent 0.34.3 (PyPI)
- Azure DevOps git provider
Bug
AzureDevopsProvider.get_repo_settings(pr_agent/git_providers/azuredevops_provider.py) callsazure_devops_client.get_item_content(...)which returns a streamed iterator of byte chunks, then keeps onlylist(contents)[0]. For any.pr_agent.tomllarger than a single chunk the file is silently truncated and config keys after the cutoff are lost.Current code
Repro
Push a
.pr_agent.tomllarge enough to span more than one stream chunk to an Azure DevOps repo. Sections at the bottom of the file are silently ignored —extra_instructions,pr_revieweroverrides, etc., behave as if not set even though the file is committed.Suggested fix
Join over the full iterator:
Environment