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.

Support compare diff URLs in `prevent-pr-commit-link-loss`

See original GitHub issue

Copy-paste this URL in a comment a click “Preview”

https://github.com/sindresorhus/got/compare/v11.5.2...v11.6.0#diff-6be2971b2bb8dbf48d15ff680dd898b0R191

GitHub changes the URL to the following, breaking it

https://github.com/sindresorhus/got/compare/v11.5.2...v11.6.0diff-6be2971b2bb8dbf48d15ff680dd898b0R191

This is a similar GitHub bug to https://github.com/sindresorhus/refined-github/issues/2327, which was fixed by https://github.com/sindresorhus/refined-github/pull/3085 (prevent-pr-commit-link-loss), so it’d make sense to extend that feature

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fregantecommented, Sep 18, 2020

Keep in mind that there’s a pretty advanced regex (which avoids selecting the url twice) already set up:

https://github.com/sindresorhus/refined-github/blob/6d339762d762b669bb48b2977f40a83c48305a2d/source/github-helpers/index.ts#L98-L99

And tested:

https://github.com/sindresorhus/refined-github/blob/86529e79015ea54b2eda9f06a1aca692acf7baea/test/helpers.ts#L176-L211

You should start from that regex: copy the regex, copy the tests (changing only the URLs) and make sure they pass.

1reaction
yakov116commented, Sep 18, 2020

@esakki-selvaraj go for it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

DiffNow - Compare Files, URLs, and Clipboard Contents Online
Upload files, provide URLs, and paste clipboard contents to compare content online. Powered by ExamDiff Pro, the most powerful desktop file comparison tool....
Read more >
Looking for a file-diff tool which allows URL's as input [closed]
Another great online tool is Mergely. It supports files as well as URLs. It has a very nice UI and you can save...
Read more >
Comparing / Diff a Production URL and a Development URL
I'm wondering if I'm missing something obvious: what I'm trying to do is do a comparison / diff between two different URLs -...
Read more >
DiffNow - Compare Files, URLs, and Clipboard Contents ...
DiffNow is a free online tool for comparing text, URLs, and files, powered by ExamDiff Pro. DiffNow offers a subset of ExamDiff Pro's...
Read more >
Recursively compare two directories with diff -r without ...
Unfortunately, older versions of diff don't support ignoring symlinks: ... Currently, diff treats symbolic links like regular files; it treats other special ...
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