{ "name": "CreatePullRequestReviewComment", "fully_qualified_name": "GithubApi.CreatePullRequestReviewComment@0.1.0", "description": "Create a review comment on a GitHub pull request.\n\nThis tool is used to create a review comment in the diff of a GitHub pull request. It uses parameters like `line`, `side`, `start_line`, and `start_side` for precise placement of comments in the pull request diff to provide feedback or suggestions.", "toolkit": { "name": "ArcadeGithubApi", "description": null, "version": "0.1.0" }, "input": { "parameters": [ { "name": "repository_owner", "required": true, "description": "The GitHub username or organization name of the repository owner. This value is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The account owner of the repository. The name is not case sensitive." }, "inferrable": true, "http_endpoint_parameter_name": "owner" }, { "name": "repository_name", "required": true, "description": "The name of the GitHub repository where the pull request exists. This value is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the repository. The name is not case sensitive." }, "inferrable": true, "http_endpoint_parameter_name": "repo" }, { "name": "pull_request_number", "required": true, "description": "The unique number that identifies the pull request within the repository.", "value_schema": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The number that identifies the pull request." }, "inferrable": true, "http_endpoint_parameter_name": "pull_number" }, { "name": "review_comment_details", "required": true, "description": "JSON object containing details for the comment: `body` (text of comment), `commit_id` (commit SHA), `in_reply_to` (ID to reply), `line` (line in diff), `path` (file path), `side` (diff side), `start_line` (start line for multi-line), and `start_side` (start side for multi-line).", "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "body": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The text of the review comment." }, "commit_id": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`." }, "in_reply_to": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The ID of the review comment to reply to. To find the ID of a review comment with [\"List review comments on a pull request\"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored." }, "line": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to." }, "path": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The relative path to the file that necessitates a comment." }, "position": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "**This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above." }, "side": { "val_type": "string", "inner_val_type": null, "enum": [ "LEFT", "RIGHT" ], "properties": null, "inner_properties": null, "description": "In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"[Diff view options](https://docs.github.com/enterprise-server@3.8/articles/about-comparing-branches-in-pull-requests#diff-view-options)\" in the GitHub Help documentation." }, "start_line": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "**Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"[Commenting on a pull request](https://docs.github.com/enterprise-server@3.8/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation." }, "start_side": { "val_type": "string", "inner_val_type": null, "enum": [ "LEFT", "RIGHT", "side" ], "properties": null, "inner_properties": null, "description": "**Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \"[Commenting on a pull request](https://docs.github.com/enterprise-server@3.8/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation. See `side` in this table for additional context." } }, "inner_properties": null, "description": "" }, "inferrable": true, "http_endpoint_parameter_name": "requestBody" } ] }, "output": { "description": "Response from the API endpoint 'pulls/create-review-comment'.", "available_modes": [ "value", "error", "null" ], "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": null } }, "requirements": { "authorization": { "provider_id": "arcade-github", "provider_type": "oauth2", "id": null, "oauth2": null }, "secrets": [ { "key": "GIT_SERVER_URL" } ], "metadata": null }, "deprecation_message": null, "metadata": { "object_type": "api_wrapper_tool", "version": "1.1.0", "description": "Tools that enable LLMs to interact directly with the GitHub API." }, "http_endpoint": { "metadata": { "object_type": "http_endpoint", "version": "1.2.0", "description": "" }, "url": "{git_server_url}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/comments", "http_method": "POST", "headers": {}, "parameters": [ { "name": "owner", "tool_parameter_name": "repository_owner", "description": "The account owner of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The account owner of the repository. The name is not case sensitive." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "repo", "tool_parameter_name": "repository_name", "description": "The name of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the repository. The name is not case sensitive." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "pull_number", "tool_parameter_name": "pull_request_number", "description": "The number that identifies the pull request.", "value_schema": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The number that identifies the pull request." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "requestBody", "tool_parameter_name": "review_comment_details", "description": "", "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "body": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The text of the review comment." }, "commit_id": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`." }, "in_reply_to": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The ID of the review comment to reply to. To find the ID of a review comment with [\"List review comments on a pull request\"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored." }, "line": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to." }, "path": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The relative path to the file that necessitates a comment." }, "position": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "**This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above." }, "side": { "val_type": "string", "inner_val_type": null, "enum": [ "LEFT", "RIGHT" ], "properties": null, "inner_properties": null, "description": "In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"[Diff view options](https://docs.github.com/enterprise-server@3.8/articles/about-comparing-branches-in-pull-requests#diff-view-options)\" in the GitHub Help documentation." }, "start_line": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "**Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"[Commenting on a pull request](https://docs.github.com/enterprise-server@3.8/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation." }, "start_side": { "val_type": "string", "inner_val_type": null, "enum": [ "LEFT", "RIGHT", "side" ], "properties": null, "inner_properties": null, "description": "**Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \"[Commenting on a pull request](https://docs.github.com/enterprise-server@3.8/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation. See `side` in this table for additional context." } }, "inner_properties": null, "description": "" }, "accepted_as": "body", "required": true, "deprecated": false, "default": null, "documentation_urls": [] } ], "documentation_urls": [], "secrets": [ { "arcade_key": "GIT_SERVER_URL", "parameter_name": "git_server_url", "accepted_as": "path", "formatted_value": null, "description": "", "is_auth_token": false }, { "arcade_key": "auth_token", "parameter_name": "Authorization", "accepted_as": "header", "formatted_value": "Bearer {authorization}", "description": "The OAuth token to use for authentication.", "is_auth_token": true } ], "request_body_spec": "{\n \"content\": {\n \"application/json\": {\n \"examples\": {\n \"example-for-a-multi-line-comment\": {\n \"summary\": \"Example for a multi-line comment\",\n \"value\": {\n \"body\": \"Great stuff!\",\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"line\": 2,\n \"path\": \"file1.txt\",\n \"side\": \"RIGHT\",\n \"start_line\": 1,\n \"start_side\": \"RIGHT\"\n }\n }\n },\n \"schema\": {\n \"properties\": {\n \"body\": {\n \"description\": \"The text of the review comment.\",\n \"type\": \"string\"\n },\n \"commit_id\": {\n \"description\": \"The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`.\",\n \"type\": \"string\"\n },\n \"in_reply_to\": {\n \"description\": \"The ID of the review comment to reply to. To find the ID of a review comment with [\\\"List review comments on a pull request\\\"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored.\",\n \"example\": 2,\n \"type\": \"integer\"\n },\n \"line\": {\n \"description\": \"The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.\",\n \"type\": \"integer\"\n },\n \"path\": {\n \"description\": \"The relative path to the file that necessitates a comment.\",\n \"type\": \"string\"\n },\n \"position\": {\n \"deprecated\": true,\n \"description\": \"**This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.\",\n \"type\": \"integer\",\n \"x-github\": {\n \"deprecationDate\": \"2022-11-01\"\n }\n },\n \"side\": {\n \"description\": \"In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \\\"[Diff view options](https://docs.github.com/enterprise-server@3.8/articles/about-comparing-branches-in-pull-requests#diff-view-options)\\\" in the GitHub Help documentation.\",\n \"enum\": [\n \"LEFT\",\n \"RIGHT\"\n ],\n \"type\": \"string\"\n },\n \"start_line\": {\n \"description\": \"**Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \\\"[Commenting on a pull request](https://docs.github.com/enterprise-server@3.8/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\\\" in the GitHub Help documentation.\",\n \"type\": \"integer\"\n },\n \"start_side\": {\n \"description\": \"**Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \\\"[Commenting on a pull request](https://docs.github.com/enterprise-server@3.8/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\\\" in the GitHub Help documentation. See `side` in this table for additional context.\",\n \"enum\": [\n \"LEFT\",\n \"RIGHT\",\n \"side\"\n ],\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"body\",\n \"commit_id\",\n \"path\",\n \"line\"\n ],\n \"type\": \"object\"\n }\n }\n },\n \"required\": true\n}", "use_request_body_schema_mode": true, "validate_request_body_schema": true } }