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.

Fix PR commit links on submission (GitHub’s bug)

See original GitHub issue

Issuehunt badges

GitHub has had this really annoying bug that changes PR commit links (e.g. this one) into non-PR-related links like this: https://github.com/sindresorhus/refined-github/commit/cb44a4eb8cd5c66def3dc26dca0f386645fa29bb

This only happens to auto-linked URLS like https://...etc and not to [text](https://...etc)

We can’t fix these links after they’ve been submitted but we can do it before submission.


This feature should should:

  1. Listen to comment form submissions
  2. Detect plain URLs to PR commits (and skip markdown links)
  3. Replace plain urls with identical markdown links, like [https://...etc](https://...etc)

Step 2 is easy to implement in most places (e.g. find a URL surrounded by spaces) but it can be tripped with content like [this url https://... is the problem](https://...) (which… probably does not happen)

Test comment content:

https://github.com/sindresorhus/refined-github/pull/3/commits/cb44a4eb8cd5c66def3dc26dca0f386645fa29bb

IssueHunt Summary

max-arias max-arias has been rewarded.

Backers (Total: $18.81)

Submitted pull Requests


Tips

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

8reactions
wearherecommented, Jun 13, 2020

This is really cool—the find of feature that makes me proud to use Refined GitHub. Nice work everyone. The styling of the warning is especially nice.

6reactions
issuehunt-app[bot]commented, May 21, 2020

@sindresorhus has rewarded $16.92 to @max-arias. See it on IssueHunt

  • 💰 Total deposit: $18.81
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $1.89
Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix PR commit links on submission (GitHub's bug) · Issue #2327
We can't fix these links after they've been submitted but we can do it before submission. This feature should should: Listen to comment...
Read more >
git, made a pull-request but found a bug in my code, how to fix ...
If the repo has not been yet pulled, you can simply fix the bug with a further commit, which will be pulled.
Read more >
Commits, Issues, Pull Requests, Releases, and more - YouTube
If you work with software, you have probably heard of GitHub. In fact, you may have some code on GitHub. However, you might...
Read more >
Work With GitHub Issues and Pull Requests
Open an Issue¶ ... Click the Issues tab from the sidebar. ... Give your Issue a title and description: Add a new Logo...
Read more >
How To Link Pull Requests to Issues Using GitHub - Keypup
You can link a pull request (PR) to an issue in a Git repository to show that a fix is in progress and...
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