Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After checking out a PR and modifying the files locally, support converting the changes to GitHub PR suggestion comments #6034

Closed
tiangolo opened this issue Jun 4, 2024 · 2 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@tiangolo
Copy link

tiangolo commented Jun 4, 2024

Description

After checking out a PR and modifying the files locally, support converting the changes to GitHub PR suggestion comments.

Current Workflow

In my workflows reviewing PRs, I normally use the VS Code GitHub Pull Request option to check out a PR by number.

Then I see the changes in files, and I start adjusting them in the editor. In many cases running and debugging the code locally until it's ready.

Once it is done, I end up with changed files in the "Source Control" tab (files not yet staged in git), but I don't have an easy way to convert those changes into GitHub PR inline suggestion comments.

The options I have are:

Copy Paste in VS Code

  • Go through each change I made to the files and manually copy-paste it
  • Switch the tab from "Source Control" to "GitHub Pull Request"
  • Manually find the same location of the change (difficult to remember sometimes)
  • Add a comment, make it a suggestion, paste the contents copied
  • Go back to the "GitHub Pull Request" tab, copy-paste the next section, and do the same process

Copy Paste to GitHub

  • Go through each change I made to the files and manually copy-paste it
  • Open a browser tab with GitHub, find the same file in the PR, find the same section
  • Add a comment, make it a suggestion, paste the contents copied
  • Go back to VS Code, copy the next piece of code and start again

Commit on Top

I can also just commit my changes on top of the PR and push them.

This is the simplest option, so, for several changes, that's what I end up doing. But in many cases, it would be better to make them as suggestions that I can show the original author, explain what needs to be changed, etc.

What I Would Like

I would like to be able to make changes directly in the code, in VS Code, and then have an integrated way to convert those local changes to suggestion comments.

Possible Worflows

  • Maybe each of my local changes could be shown in some way in the "GitHub Pull Request" with a button to "add as suggestion".

  • Or maybe a button to "add a suggestion comment to PR" could be shown in the "Source Control" tab.

  • Or maybe I could git stage the changes I would like to suggest and there could be a button or command to "send all staged changes as inline code suggestions to PR" that starts a PR review with all my comments, and then I can go to GitHub on the browser and update them with more comments or edit them further if necessary.

@alexr00
Copy link
Member

alexr00 commented Jun 5, 2024

Duplicate of #5256

@alexr00 alexr00 marked this as a duplicate of #5256 Jun 5, 2024
@alexr00 alexr00 closed this as completed Jun 5, 2024
@alexr00 alexr00 added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 5, 2024
@tiangolo
Copy link
Author

tiangolo commented Jun 5, 2024

Thanks @alexr00! I didn't see that one was the same when searching through the open issues, sorry about that. Thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants