Skip to content

Update azuredevops_provider.py#2375

Open
agonzalesipcoop-cmyk wants to merge 1 commit into
The-PR-Agent:mainfrom
agonzalesipcoop-cmyk:patch-1
Open

Update azuredevops_provider.py#2375
agonzalesipcoop-cmyk wants to merge 1 commit into
The-PR-Agent:mainfrom
agonzalesipcoop-cmyk:patch-1

Conversation

@agonzalesipcoop-cmyk
Copy link
Copy Markdown

@agonzalesipcoop-cmyk agonzalesipcoop-cmyk commented May 6, 2026

fix bringing only the first chunk of the toml file, on files bigger that the chunk size (4kb)
Closes #2376

fix bringing only the first chunk of the toml file
@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Fix incomplete TOML file retrieval in Azure DevOps provider

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Fix incomplete TOML file retrieval for files larger than chunk size
• Replace single chunk extraction with full content concatenation
• Ensures complete .pr_agent.toml configuration is read
Diagram
flowchart LR
  A["get_item_content API"] -- "returns chunks" --> B["Previous: list(contents)[0]"]
  A -- "returns chunks" --> C["Fixed: b''.join(list(contents))"]
  B -- "only first chunk" --> D["Incomplete config"]
  C -- "all chunks combined" --> E["Complete config"]
Loading

Grey Divider

File Changes

1. pr_agent/git_providers/azuredevops_provider.py 🐞 Bug fix +1/-1

Fix TOML file chunking issue in get_repo_settings

• Changed get_repo_settings() method to concatenate all content chunks instead of taking only the
 first one
• Replaced list(contents)[0] with b"".join(list(contents)) to handle files larger than the chunk
 size
• Fixes issue where TOML configuration files exceeding 4KB were truncated

pr_agent/git_providers/azuredevops_provider.py


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects Bot commented May 6, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@agonzalesipcoop-cmyk
Copy link
Copy Markdown
Author

#2376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AzureDevopsProvider.get_repo_settings drops chunks after the first, silently truncating .pr_agent.toml

1 participant