Disable "hidden conversations" in GitHub pull requests? - github

When I go to a page of an open PR in GitHub, e.g. https://github.com/xyz/abc/pull/123, when the number of conversations exceeds some limit, GitHub automatically collapses some of them in the middle under a box that says "[n] hidden conversations"; you have to click "Load more" in order to see them.
Since the open conversations are the most important thing on a PR and the reason I open or refresh the page in the first place, is there a way to undo this and always show all the conversations? I haven't seen anything relevant in settings; does a browser extension exist to do this?

I've had the same issues. This isn't a solution, but it might be a workaround. I only just discovered it, so I'll have to see how it feels going forward.
In a GitHub PR, change the tab from "Conversation" to "Files changes"
There's a new dropdown called "Conversations", which seems to list all of them.
User ldog explains some limitations with this in the comments below:
Unfortunately this only works if the comments are in sync with the latest commit or the commits that you are currently looking at, if you wanted to see all comments across all commits, this doesn't work. For example, when clicking on a comment that no longer exists due to code changes in a commit this does nothing.
I would prefer to find the same solution the OP is seeking, but I wanted to share this for anyone else landing here with the same issue in case someone finds it helpful.
Also, I'm cross-posting this information in a related webapps.stackexchange question: https://webapps.stackexchange.com/questions/148308/how-to-always-show-all-pr-conversations-in-github

Related

How to flag a comment in GitHub Issue for moderation (spam, misinformation, hate speech)

On GitHub, how can I flag a comment in a project issue as spam, misinformation, hate speech, etc?
I came across a comment in a GitHub issue recently that was not only completely off-topic, but also aggressive and attempting to spread misinformation.
As with most other Web-2.0 websites, I expected there to be some way to click the hamburger menu on the comment and "flag" it. And I'd expect that a "flagged" message would alert a content moderator about the problematic content. And I would expect that, if several users flagged the same content, then it would be automatically removed unless a moderator manually approved it.
Previously, I've also encountered many "locked" issues on GitHub, which stifles collaboration. When I asked the repo maintainer why they locked old issues, they said it was done to ease the burden of having to moderate spam on old issues.
Am I missing something? Where is the flag comment button in GitHub issues?
Report the user, not the comment.
As far as I know, it's not possible to flag a specific comment on a GitHub issue. Instead, just click on the user then click the Report button on their user profile.

How to view changes in GitHub after comments

Is there a way to view changes that were made after a code review by other developers?
Say, someone suggested a change and commented in GitHub on a specific file.
PR creator made changes to that specific file and checked in. - Is there a way to view that change?
Clicking view changes doesn't take me directly to the file that has comments. It takes me to all the files
This feature was very useful in BitBucket, as I could see all the changes of that specific file and comments in one place. Seems it's missing in GitHub.
This did not help:
https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request
The "Reviewing proposed changes in a pull request" you mention (as not helping) should still include a Jump to link:
That should allow you to narrow the list of files, and select the one you want to go to immediately.

GitHub pull request reviews line comments behaviour

Recently GitHub introduced some new features including Pull Request Reviews.
In the past, line comments in Pull Requests would collapse like this after the line was changed in further commits:
Since the launch of the new feature, line comments no longer collapse even after further commits that address the issues. So far I've only had one PR and I'm not sure if the reviewer added single comments or used the new "Start a review" feature.
How can I get the old behaviour back or does it improve in the new "Start a review" feature?
I've watched their video tutorial on this feature and I can't determine whether the behaviour right now is what I'm supposed to be experiencing.
I sent a message to GitHub support and received the following response:
Sorry for the trouble! We are aware that with reviews comments no longer become "outdated" after new code is pushed.
This is definitely on our radar as something we need to address. I can't give a timeline for it, but we will be looking into it soon.
Since two years ago, GitHub now (august 2018) proposes "Collapse all diffs in a pull request at once":
When a pull request contains a lot of changed files, code reviewers can find it hard to isolate the changes that are relevant to them.
Now you can collapse (or expand) the contents of all diffs in a pull request by holding down the alt key and clicking on the inverted caret icon in any file header.
You can then go one step further by using the “Jump to file or symbol” dropdown to jump to the file that you’re interested in and automatically expand it.
That is not exactly the old behavior, but that does still improve the code review process.

How to comment on long github diff

One of the files in a pull request that I'm currently reviewing has too many changes and github only shows the summary about deletions and additions.
This is rather unfortunate, since I can't comment on the changes that happened in this file. Is there any way to force github to show the diff for this one file in the PR and enable the comment functionality?
Thanks!
You can't force it to comment from the browser, but you can workaround it to create the comment and have someone see it.
In Large github commit diff not shown, they say a Hubber said:
We have some limits on diffs that we show in the browser in order to keep the pull request and compare pages working.
As of today, GitHub's help still states there are (bigger) limits.
If you know the lines you want to comment you could use GitHub's API to create the comment. I don't know if that comment will show on the diff page (I don't think so, as there won't be a diff at all), but you will certainly see it on the comments tab, as usual.

How to view line comments in GitHub?

I spent all morning in GitHub reviewing a pull request, writing detailed comments on many lines in the Diff view on the pull-request page.
I individually saved every line-by-line comment, and they all appeared in their correct places. I left the pull-request page, and when I returned to it, all my line-by-line comments were gone!
I have no idea why they disappeared, where they went, whether other users can see them and I can't, what any of this means, and whether I can trust myself going forward using GitHub, or whether I just have to go back to the telephone and fax for remote collaboration!
I did some web searches such as "how to view line comments in GitHub" for info about this, but could not find anything to relieve my panic. I will be grateful for advice and clues.
This is top result for "Can't view github comments" in google.
If you're here because you've left comments, and can see your own comments, but others cannnot, then check for a yellow pending label on your comments. Others cannot see your comment until you've completed the review process and selected whether you want to request changes. Once you click through a full review, then others will see your comments.
Note: I'm answering a slightly different question than the O.P., but I have a feeling that lots of other devs with this issue are hitting this stackoverflow question. I'm just hoping to help them. I myself had this issue and couldn't find a more relevant answer than this thread. :)
The line-comments depend on the commit that were made on.
If the person that made the pull request rebased that commit then you're not looking at what you were previously looking. It's a different commit, thus there are no comments.
Look on the 'Your Actions' tab and find a line in the actions' history were you commented on that commit, click that commit and you'll see the comments are still there.
If the commit was rebased, you wont find that commit were it used to be (some branch) and not on any repo probably (if it's not on another branch). It is just cached by git and github, until the garbage collector kicks in.
The old answer doesn't work for me because I don't see Your Actions or Public Actions now.
My pending comments disappeared after I started typing into what I thought was a comment I'd opened for editing. It wasn't open, and one of my keys may have been a shortcut. I could still see the button to finish my review (including the count of my pending comments) but the comments had disappeared.
I eventually got them back by navigating to the pull request, then to the commit I was reviewing.