Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Hyperlink pull request and issue numbers #1482

Open
PatrickF1 opened this issue Jul 20, 2023 · 6 comments
Open

🚀 Hyperlink pull request and issue numbers #1482

PatrickF1 opened this issue Jul 20, 2023 · 6 comments

Comments

@PatrickF1
Copy link

Hi Dan, first off thanks so much for making Delta. Switched from diff-so-fancy 2 months ago and never looked back!

I make use of the hyperlink feature a lot. I think one way we can enhance it is to support pull request links in the commit log. When you merge PRs on Github, you may have noticed it'll append (#pr-number) at the end of the commit message. Maybe delta can hyperlink those?

Screenshot 2023-07-20 at 11 23 03 AM
@PatrickF1 PatrickF1 changed the title 🚀 Hyperlink PR link 🚀 Hyperlink pull request numbers Jul 20, 2023
@dandavison
Copy link
Owner

Hi @PatrickF1, that seems like a great idea and very doable. If you have any interest in implementing it then don't hold back!

@PatrickF1
Copy link
Author

Hi Dan, happy to take a stab at it. Could you link me to where the feature for hyperlinked sha's is limited?

@dandavison
Copy link
Owner

Hi Patrick, sorry for the slow reply, I was offline. Commit SHAs are hyperlinked here:

features::hyperlinks::format_commit_line_with_osc8_commit_hyperlink(

@mvdan
Copy link

mvdan commented Dec 30, 2023

The client can't really tell if #123 is an issue or a pull request, so I think it should linkify all of them as issues, and rely on the server to redirect if the number is a pull request. This would allow supporting commit message lines like Fixes #123 too.

For example, note how https://github.com/dandavison/delta/issues/1573 gets redirected to https://github.com/dandavison/delta/pull/1573.

@PatrickF1
Copy link
Author

PatrickF1 commented Dec 30, 2023 via email

@PatrickF1 PatrickF1 changed the title 🚀 Hyperlink pull request numbers 🚀 Hyperlink pull request and issue numbers Dec 30, 2023
@PatrickF1
Copy link
Author

As a slight optimization, we could probably send (#number) to /pull and #number to /issues, since most of the time, pull requests are added by GitHub in the commit with parens around them.

Btw, in case anyone is waiting on me to implement this, I no longer plan on doing it. Learning Rust proved to be too big of a hurdle to jump. I hope someone else will take this on, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants