ado_git_create_pr_comment
Post comments on Azure DevOps pull requests: create threads, reply, or add inline code comments with optional line numbers.
Instructions
Add a comment to a pull request. To reply to an existing thread, provide threadId (do not provide filePath). To create a new general thread, provide only content. To create an inline code comment, provide filePath; optionally add lineNumber (start) and endLineNumber (end) for a multi-line range, and side ('right' for new file, 'left' for old). Requires vso.code_write PAT scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | Diff side for the inline comment: 'right' (new file, default) or 'left' (old file). Only used with filePath. | right |
| content | Yes | Comment text (supports markdown) | |
| project | Yes | Project containing the PR | |
| filePath | No | File path for an inline comment (e.g. '/src/index.ts'). Only for new threads; mutually exclusive with threadId. | |
| threadId | No | Thread ID to reply to. Mutually exclusive with filePath. | |
| lineNumber | No | Start line number for the inline comment range. Requires filePath. | |
| repositoryId | Yes | Repository ID or name | |
| endLineNumber | No | End line number for a multi-line inline comment. Defaults to lineNumber when omitted. Requires filePath. | |
| pullRequestId | Yes | Pull request ID |