Repository navigation
Support GitHub's suggested changes #603
Description
Activity
- addedfeature-requestRequest for new features or functionalityRequest for new features or functionality
on Oct 23, 2018 This would be really useful to have it when making reviews through the VS code.
With 589 and this functionality you would be pretty much be able to do the whole PR from VS code!
Reacted by Guillaume LemaitreDoes this FR only cover displaying the suggestions made elsewhere or also being able to make suggestions from VS code? Both would be great!
Reacted by Curtis Gibby, Vatsal Patel, Arseniy Rubtsov, Corentin Girard and Torben NordtorpI found this feature very interesting.... is it gonna be put in the roadmap ?
It would be very handy if I could just open a file, make some changes in it and post them as a suggestion.
Reacted by Erek Speed, Brian J. Murrell, Sebastian Fey, Aylin, Yahya Gilany, Corentin Girard, Peter Metz, Curtis Gibby, Sebastián Duque Mesa and Sebastián RamírezIt would be really big improvements for dev productivity
Reacted by Calvin BuiYes, this feature would be very useful. Currently we can add suggestions (using ```suggestion) but they don't show up properly. For example, the suggestion to remove a line does is not displayed at all.
Reacted by William Pleasant-Ryanthis would also require #1376
without these two features this plugin is just useless.
Reacted by Ozan Öğreden, Lovkush, Mat Simon, Matt Kafonek, nelson, Juan David Suárez and Sebastián Duque Mesawithout these two features this plugin is just useless.
Your comment is extremely toxic. It does not bring any value to the discussion.
Reacted by Lovkush, Frederik Schönfeldt, ayush gupta, Mat Simon, nelson, Isak Persson, Corentin Girard, Juan David Suárez, Uruemu S Aganbi and Sebastián Duque Mesawithout these two features this plugin is just useless.
Your comment is extremely toxic. It does not bring any value to the discussion.
you're right sorry. Just being frustrated finding no tools to make reviews outside of the Github webgui. Even jetbrains can't do it.
Reacted by Lovkush, Garrett LoVerde, Matheus Contassot, Isak Persson and Jonathan MacKenzie++ for this suggestion!
I'd also note that it could be extremely useful if a user shifts into "PR Review Suggestion Mode" so that any code changes made in VS Code's editors were batched as PR Comment code change suggestions.
(but even a basic implementation would be extremely helpful)
Reacted by Sébastien Gandon, Jonathan MacKenzie, Mikey Lombardi (He/Him), Rafael Oliveira, Curtis Gibby and Raphael MarsanSo just to check my understanding, currently the best way to make code suggestions (especially code suggestions for multiple lines of code) is to use GitHub's online GUI. Is that right?
For single line changes (since #1376 is still open), you can manually type:
```suggestion your suggestion \```(ignore that slash though—I just don't know how to escape backticks in markdown)
Reacted by ayush gupta and Corentin Girard31 remaining items
- added 2 commits that reference this issue
on Dec 31, 2022 Alex Ross (@alexr00) this is great! One feature I would like to request is a settings option to create a commit on every applied suggestion. Right now, you can apply a suggestion and resolve a conversation, but then if something happens in between, that change gets lost. Should I file this as a separate issue?
Reacted by Alex RossJustin Grote (@JustinGrote) a separate issue for that makes sense. Personally, I don't want to have a separate commit per suggestion as that feels like an implementation detail from when you could only accept suggestions on github.com. I'd like to gauge interested in having separate commits like this though, as others like yourself may prefer to have many smaller commits.
FYI the "apply suggestion" button in the github web UI does exactly this, so it's not without precedent, and those who are coming from the web UI experience are going to expect this flow like I did. I agree it probably shouldn't be the default as that's not typical of vs code flow but there should at least be a setting to enable it.
Alex Ross (@alexr00) Is there anyway to commit suggestions? Like in comment suggestions made in github? Something like I agree with it so I apply it. I found a "Apply patch" button when a suggestion is made inside vscode, but anything when it was send by github.
Rubén Pérez Palacios (@Dru01) that is what is requested in #603 (comment). Currently, the suggestion will be applied locally, but not committed.
Reacted by Baris ÖzcelikAlex Ross (@alexr00) Thanks for your work on this! I can't seem to find a button in the review comment to invoke the
pr.applySuggestioncommand, even in an up-to-date Insiders build:Leonhard Gruenschloss (@lgruen) do you have the PR checked out? We only support accepting a suggestion in a checked out PR.
Alex Ross (@alexr00) Yes, this was on a checked out PR. I used the checkout button on the PR description and also double-checked that the right branch was shown in the status bar. Not sure whether that makes a difference, but I hadn't created this PR through VS Code, but directly in GitHub's web interface.
Leonhard Gruenschloss (@lgruen) it shouldn't make a difference. Is this a public PR that you could share a link to? There's likely something about this specific comment that we're not parsing correctly.
Alex Ross (@alexr00) In the meantime I've accepted the suggestions using the GitHub web interface, but the original PR suggestion from the screenshot is this one: populationgenomics/cpg-infrastructure#132 (comment)
I can also try to create another new PR if it's not reproducible with the above one anymore.
Leonhard Gruenschloss (@lgruen) thanks! I found a way to reproduce the issue that might be what you're hitting: #4839
Alex Ross (@alexr00) Great, that totally sounds like it!


Github announced a new suggestion api that started being added to the code review tools.
Right now the extension takes these at face value as text.
For example take this comment.
In github:
In vscode:
Maybe have the suggested changes be shown as a diff? maybe even have a prompt to incorporate the changes, similarly to a merge conflict.