question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Point issue/PR linkbacks to exact comment that caused the linkback

See original GitHub issue

Issue events like someone mentioned this issue usually links to the issue directly. But it would be helpful if the link was to the mention specifically; i.e., append the link with the #issuecomment-<eventID> link so that clicking on the mention event will take the user directly to the comment it was referenced in. Especially, when the linked issue is hundreds of comments long ( example reference link ) .

There are multiple problems that I can think of :

  1. Whether there is an API to fetch all the issue events
  2. Even if there was an API, does it have the event IDs required

I looked around the Issues REST API documentation, but couldn’t find something that was suitable for this purpose. I did not go through the graphQL API since it is too confusing for me to comprehend.

Assuming that the above problems do not exist, another problem is that there is only one mention event per link; i.e., even if you mention the same issue multiple times ( in different comments ) from the another issue, there will not be duplicate mention events. That raises the following questions :

  1. do the event contain all the references to the issue or only the first reference?
  2. if it does contain all the references, then which reference should the proposed feature link to?

Does all of this seem like a technically challenging feature? Is this a feature that would be feasible for Refined GitHub?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
fregantecommented, Jul 11, 2021

I meant find it on the linked issue. In short:

  1. User visit issue
  2. User sees linkback on current issue
  3. Use clicks on linkback, which has no hash
  4. Page starts loading
  5. Refined GitHub looks for a link to the previous page
  6. Refined GitHub changes the hash to that comment, if found

This feature would be split in 2 parts:

  • on one load, it finds linkbacks and appends something like #from-sindre/refined-123 which is just a reference to the current page and it doesn’t actually work on its own
  • on another load, if the above hash is present, it looks for comments that include a link to sindre/refined/issue|pull/123 and sets location.hash.replace('#issuecomment-1356743') to focus the comment

This requires no API calls.

Does it make more sense now? Am I getting this right?

As for commit links, they’re simply not handled, we could easily exclude them.

3reactions
fregantecommented, Jul 11, 2021

We can give this feature a try

Read more comments on GitHub >

github_iconTop Results From Across the Web

Point issue/PR linkbacks to exact comment that ... - GitHub
User sees linkback on current issue; Use clicks on linkback, which has no hash; Page starts loading; Refined GitHub looks for a link...
Read more >
Disavow links to your site - Search Console Help
You should disavow backlinks only if: You have a considerable number of spammy, artificial, or low-quality links pointing to your site,
Read more >
Should my backlinks point to my home page or to internal ...
Hi, I run a fitness blog and I get the majority of my backlinks through ... I was wondering if this backlink should...
Read more >
Backlink Analysis: How to Spot Quality and Toxic Backlinks
This guide will break down the difference between quality and toxic backlinks, show you how to evaluate them, and show you how to...
Read more >
How to Find and Fix Broken Links (to Reclaim Valuable "Link ...
Broken backlinks are broken inbound links from other websites to your site. This is what a broken backlink looks like: (It goes from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found