post_rich_comments
Add structured review comments to Azure DevOps pull requests with severity, type, and formatting, supporting batch posting and dry-run validation.
Instructions
Batch-post structured review comments with severity, type, and formatting.
Each comment dict has keys: comment_id: str (required — unique identifier) title: str (required — short heading) content: str (required — comment body) severity: str (optional — "info","suggestion","warning","error","critical") comment_type: str (optional — "general","line","file","suggestion","security","performance") file_path: str | None (optional — anchors to file) line_number: int | None (optional — anchors to line, requires file_path) suggested_code: str | None (optional) reasoning: str | None (optional) business_impact: str | None (optional) tags: list[str] (optional) status: str (optional — default "active") parent_thread_id: int | None (optional — reply to existing thread)
String severity/comment_type values are coerced to enums at this layer. Invalid values return an ActionableError listing valid options.
dry_run=True validates and shows what would be posted without calling the API. filter_self_praise=True (default) removes praise comments authored by the caller.
Args: pr_url_or_id: A full PR URL or numeric PR ID. comments: List of comment dicts to post. dry_run: If True, validate without posting. batch_size: Number of comments per API batch (default 5). filter_self_praise: If True, filter out self-praise comments. working_directory: Optional path for context resolution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr_url_or_id | Yes | ||
| comments | Yes | ||
| dry_run | Yes | ||
| batch_size | Yes | ||
| filter_self_praise | Yes | ||
| working_directory | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |