mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 12:20:38 +08:00
fix PR comments
This commit is contained in:
2
Usage.md
2
Usage.md
@ -451,3 +451,5 @@ For webhook security, configure the webhook username and password on both the se
|
|||||||
webhook_username = "<basic auth user>"
|
webhook_username = "<basic auth user>"
|
||||||
webhook_password = "<basic auth password>"
|
webhook_password = "<basic auth password>"
|
||||||
```
|
```
|
||||||
|
> :warning: **Ensure that the webhook endpoint is only accessible over HTTPS** to mitigate the risk of credential interception when using basic authentication.
|
||||||
|
|
||||||
|
@ -326,7 +326,8 @@ class AzureDevopsProvider(GitProvider):
|
|||||||
|
|
||||||
def publish_description(self, pr_title: str, pr_body: str):
|
def publish_description(self, pr_title: str, pr_body: str):
|
||||||
if len(pr_body) > MEX_PR_DESCRIPTION_LENGTH:
|
if len(pr_body) > MEX_PR_DESCRIPTION_LENGTH:
|
||||||
pr_body = pr_body[:MEX_PR_DESCRIPTION_LENGTH]
|
trunction_message = " ... (description truncated due to length limit)"
|
||||||
|
pr_body = pr_body[:MEX_PR_DESCRIPTION_LENGTH - len(trunction_message)] + trunction_message
|
||||||
get_logger().warning(
|
get_logger().warning(
|
||||||
"PR description exceeds the maximum character limit of 4000. Truncating the description."
|
"PR description exceeds the maximum character limit of 4000. Truncating the description."
|
||||||
)
|
)
|
||||||
|
@ -91,6 +91,7 @@ async def handle_webhook(background_tasks: BackgroundTasks, request: Request):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# currently only basic auth is supported with azure webhooks
|
# currently only basic auth is supported with azure webhooks
|
||||||
|
# for this reason, https must be enabled to ensure the credentials are not sent in clear text
|
||||||
def validate_basic_auth(request: Request):
|
def validate_basic_auth(request: Request):
|
||||||
auth = request.headers.get("Authorization")
|
auth = request.headers.get("Authorization")
|
||||||
if not auth:
|
if not auth:
|
||||||
|
Reference in New Issue
Block a user