Skip to content

Updating description for create_pull_request_thread#1270

Draft
krid-583 wants to merge 1 commit into
microsoft:mainfrom
krid-583:users/krid/repo_create_pull_request_thread_suggestion-bugs
Draft

Updating description for create_pull_request_thread#1270
krid-583 wants to merge 1 commit into
microsoft:mainfrom
krid-583:users/krid/repo_create_pull_request_thread_suggestion-bugs

Conversation

@krid-583
Copy link
Copy Markdown
Contributor

  • When adding a suggestion through create_pull_request_thread in PR's, sometimes the tool collects the length of the suggested_content and marks the comment to that portion of the line which ends up being different from the user's intent.

Example:

Actual Line:      - //padding: functions.toRem(8) functions.toRem(16);
SuggestedContent: + padding: functions.toRem(8) functions.toRem(16);6);
  • Also the API used for creating this considers the rightFileEndOffset as an exclusive value and ignores the character in last position
image image

The offset used here is 13 even though the line's character length is 12.

Fix

Updated the description of parameter to consider both of this while finding the value of RightEndFileOffset

GitHub issue number

1265

Associated Risks

  • The MCP Client missing the instructions in the description

PR Checklist

  • I have read the contribution guidelines
  • I have read the code of conduct guidelines
  • Title of the pull request is clear and informative.
  • 👌 Code hygiene
  • 🔭 Telemetry added, updated, or N/A
  • 📄 Documentation added, updated, or N/A
  • 🛡️ Automated tests added, or N/A

🧪 How did you test it?

Manually tested by trying to tell it to add a suggestion comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: repo_create_pull_request_thread suggestion comments are corrupted when rightFileEndOffset is shorter than the original line

1 participant