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.

Issue/PR hyperlink embed upgrade

See original GitHub issue

Description

What this issue solves

This issue aims to solve two things:

  • The format in which issues and pull requests are displayed in the embed that the bot automatically sends.
  • The order in which the issues and pull requests are sent. This wasn’t part of the original issue but I figure if this is correctly implemented then this could be fixed too.

Current implementation

Upon mentioning an issue or pull requests in a message such as sir-lancebot#69 or bot#420, the issue/PRs are displayed in an embed in a random order without knowing which issue/PR is which. This is not a problem when a single issue/PR is mentioned but with anymore it becomes hard to figure out which is which quickly. Here is an example:

image

It is unclear which pull request is site#474 and which is site#477.

Currently the code uses a set and so the order is not preserved and we can’t link a URL back to the issue or pull request without doing some fancy URL stuff.

Proposed implementation

This line should change from

issues = set(issues)

to

issues = list(dict.fromkeys(issues))

And on this line we could simply just change the format of the string as it is added onto the embed to include the issue/PR number.

Proposed Implementation 2

This implementation involves the more_itertools library. Specifically, the more_itertools.unique_everseen function which would mean the previous change would instead need to be to:

issues = list(more_itertools.unique_everseen(issues))

This comes with the advantage of more_itertools being used in other parts of Sir Lancebot.

End result

Going with either implementation, we would like to reach an embed that looks more like this, namely, it includes the issue/PR number in the hyperlink. Example:

3DC12400-A012-4CD2-B6DA-A8249850D016

Image provided by A Real Username#8028

Reasoning

I think this would be useful as it prevents community members from clicking on each hyperlink and checking if they managed to somehow click the correct link. Otherwise, going back and trying again. It just saves time and effort.

Would you like to implement this yourself?

  • I’d like to implement this feature myself
  • Anyone can implement this feature

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
D0rs4ncommented, Jun 28, 2021

Hi! I would like to give it a try! 👍

0reactions
Xithriuscommented, Aug 23, 2021

Very cool.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Embed Links and Shortcodes - WordPress.com
If your embed isn't working, here are a few troubleshooting steps you can try. ... Make sure to place the embed link or...
Read more >
Issues when you click a hyperlink to SSO Web site - Office
When you click a hyperlink in a Microsoft Office document, you may experience the following behavior before you can open the page that...
Read more >
How do I create hyperlinks to external URLs in the...
To create a hyperlink using the menubar, click the Insert menu [1], select the Link option [2], and select the External Links option...
Read more >
Hyperlinks not working in Outlook? How to make links open ...
You have always opened links in Outlook just fine, and then all of a sudden hyperlinks stopped working and whenever you click on...
Read more >
Learn how to create, manage, and edit hyperlinks in InDesign
To update hyperlinks to external documents, choose Update Hyperlink in the Hyperlinks panel menu. Go to a hyperlink source or anchor. To ...
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