mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 12:20:38 +08:00
Refactor code in pr_code_suggestions.py and remove 'use_repo_settings_file' from azure.md and automations_and_usage.md
This commit is contained in:
@ -4,7 +4,6 @@ To use Azure DevOps provider use the following settings in configuration.toml:
|
||||
```
|
||||
[config]
|
||||
git_provider="azure"
|
||||
use_repo_settings_file=false
|
||||
```
|
||||
|
||||
Azure DevOps provider supports [PAT token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) or [DefaultAzureCredential](https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview#authentication-in-server-environments) authentication.
|
||||
|
@ -170,7 +170,6 @@ To use Azure DevOps provider use the following settings in configuration.toml:
|
||||
```
|
||||
[config]
|
||||
git_provider="azure"
|
||||
use_repo_settings_file=false
|
||||
```
|
||||
|
||||
Azure DevOps provider supports [PAT token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) or [DefaultAzureCredential](https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview#authentication-in-server-environments) authentication.
|
||||
|
@ -393,11 +393,7 @@ class PRCodeSuggestions:
|
||||
|
||||
for label, suggestions in suggestions_labels.items():
|
||||
num_suggestions=len(suggestions)
|
||||
# pr_body += f"""<tr><td><strong>{label}</strong></td>"""
|
||||
pr_body += f"""<tr><td rowspan={num_suggestions}><strong>{label.capitalize()}</strong></td>\n"""
|
||||
# pr_body += f"""<td>"""
|
||||
# pr_body += f"""<details><summary>{len(suggestions)} suggestions</summary>"""
|
||||
# pr_body += f"""<table>"""
|
||||
for i, suggestion in enumerate(suggestions):
|
||||
|
||||
relevant_file = suggestion['relevant_file'].strip()
|
||||
@ -444,11 +440,11 @@ class PRCodeSuggestions:
|
||||
{example_code}
|
||||
"""
|
||||
pr_body += f"</details>"
|
||||
|
||||
pr_body += f"</td></tr>"
|
||||
|
||||
|
||||
# pr_body += "</details>"
|
||||
pr_body += """</td></tr>"""
|
||||
# pr_body += """</td></tr>"""
|
||||
pr_body += """</tr></tbody></table>"""
|
||||
return pr_body
|
||||
except Exception as e:
|
||||
|
Reference in New Issue
Block a user