Autolink GitHub issues and commits in posts. Original by @sijad.
Install manually with composer:
composer require fof/github-autolink:"*"
composer update fof/github-autolink
An extension by FriendsOfFlarum.
Is this extension is installed on disquss.flarum.org? There is invalid link here: https://discuss.flarum.org/d/19301-keyboard-shortcuts/9
rob006 Yes. It only affects new/edited posts as old posts already have their content rendered as HTML.
There's an issue here as well π€: https://discuss.flarum.org/d/21865-account-deletion/2
matteocontrini As I said, the fixes only affect posts when they have been created or edited after the extension has been updated - so old issues with github auto link will remain broken. This isnβt a bug - itβs how itβs intended to be as rerendering every single post would dramatically slow down the site.
datitisev thanks, I didn't see any mention of fixes so I thought it was the same as before.
matteocontrini
Now tagged with beta 8 support. Also supports pull request links and comments.
Though I didn't look at the bug before answering - my bad. Yeah, that seems like a bug with the new version, so I'll try to fix it now.
composer require fof/github-autolink
Can we make this for internal links? For example i paste this URL in text area https://discuss.flarum.org/d/21856-friendsofflarum-github-autolink/8 and an extension convert to FriendsOfFlarum GitHub Autolink/#8 (or 21856/#8) would be awesome!
tolgaaaltas π€ that's an idea, though it'd require more work than just shortening existing text.
Did something change recently ? All links to issues seem to show "(comment)" after them, even if they don't reference a comment.
Example: https://github.com/flarum/core/issues/1356 flarum/core#1356
https://github.com/flarum/core/issues/1356
The preview doesn't show (example), but once posted it does.
clarkwinkelmann I think the problem is the isset() call at line 35. I'm no PHP expert but I think the variable is always set even if there is no match, and it's instead empty.
isset()
Those lines should really be commented anyway, it's hard to understand what they're doing π
(comment)
(diff)
composer require fof/github-autolink php flarum cache:clear
ianm you forgot the :
:
Littlegolden Whoops π thanks for pointing that out π