add_inline_pr_comment
Add an inline review comment to a specific line in a file within a GitHub pull request, enabling targeted feedback on code changes.
Instructions
Adds an inline review comment to a specific line in a file within a pull request on GitHub. Args: repo_owner (str): The owner of the repository. repo_name (str): The name of the repository. pr_number (int): The pull request number. path (str): The relative path to the file (e.g., 'src/main.py'). line (int): The line number in the file to comment on. comment_body (str): The content of the review comment. Returns: Dict[str, Any]: The JSON response from the GitHub API containing the comment data if successful. None: If an error occurs while adding the comment. Error Handling: Logs an error message and prints the traceback if the request fails or an exception is raised.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_owner | Yes | ||
| repo_name | Yes | ||
| pr_number | Yes | ||
| path | Yes | ||
| line | Yes | ||
| comment_body | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| body | Yes | ||
| user | Yes | ||
| created_at | Yes | ||
| updated_at | Yes |