vscode-pull-request-github
vscode-pull-request-github copied to clipboard
Make it more discoverable that you need to check out a PR to edit files
When viewing comments made by a reviewer I seem to be in a read-only version of the file without any easy way to even open a writable copy for me to address the comment.
It really would be best if I could edit the file right where I am viewing the comment so that I can continue to view it's context while making my change.
@brianjmurrell have you checked out the pull request (right click on the pull request in the Pull Requests view and "Checkout Pull Request")?
I would have expect that either its editable straight away, or there is some guidance on how to get here as intuitively this is what I would expect.
I eventually figured it out, but perhaps if you don't make it editable straight away we can show a message saying "check out the pull request to edit this file"
I'm sitting here at my keyboard, having just tracked down some insight on how to manage PRs in the extension -- where this issue itself provides the information... wondering what the side-effects of clicking "checkout PR" might be... are there any? I probably should be working on this PR, but now have some cognitive overhead here, as I have just installed this extension to help my workflow, but am not quite sure how to use it. Do I shelve this and go back to the command line?
So, anecdotally, I also agree some information/documentation is probably needed for managing PRs in this extension -- the workflow isn't straight forward for this user.
I'm having this issue as well. Even after checking out the pull request, the file is still in read-only mode and can't be edited.
I am also having the same issue. Checking out the pull request doesn't help, but it does put me on a new branch, which I don't want because I was already on the branch that this pull request came from.
@ericharper I'm trying to "upgrade" the readonly files after you checkout the PR: https://github.com/microsoft/vscode-pull-request-github/issues/3631
@GMNGeoffrey This sounds like a bug. You are on the "from" branch of the PR already, but you cannot edit a file from the pull request? Would you be willing to open a new issue with details about how you opened this readonly file?
@alexr00 that was the case, but I can't reproduce it now. I'll file a new issue with exactly what I did if it happens again. From memory, I set up the extension and was already on the branch. When I went to PRs and clicked on the one corresponding to the branch, I was able to see comments but not edit the buffer. When I right clicked to "Checkout Pull Request" it switched me to a new branch pr/GMNGeoffrey/9765 but I still wasn't able to edit from the diff view. I also somehow ended up with pr/GMNGeoffrey/9765-1
@GMNGeoffrey thank you for the additional details. This is definitely a bug. I'll see if I can figure out how this may have happened.
Yes I had the same problem, I submitted the pr and someone else pointed it out to me, but when I edited it on the GitHub pull request plugin I found that it was in read-only mode, making it hard to change the code against other people's comments
This issue just happened to me now: I'm already on the branch the PR came from, the file with the comment is in the read-only more, clicking "check out" in the "cannot edit this pull request. check out this pull request to edit" message doesn't unlock the read-only mode.
Reloading VSCode somehow magically fixes this
@grass29 I'm not able to reproduce this. Can you open a new issue and share a gif? I'm going to close this issue because we have made checking out a PR more discoverable with the "cannot edit this pull request. check out this pull request to edit" message.