#Mask Github Issue and PR Links
1 messages ยท Page 1 of 1 (latest)
Would be cool when the REGEX automatically checks if you wrap the link in <> or not and then shows the embed or not
make it capture the repo and specify that
If you want it to grab the Repo, you can use this
Issue
Find: (https:\/\/github\.com\/[^\/]+\/([^\/]+)\/issues\/([0-9a-f]{1,}))
Replace: [`$2 #$3`]($1)
PR
Find: (https:\/\/github\.com\/[^\/]+\/([^\/]+)\/pull\/([0-9a-f]{1,}))
Replace: [`$2 #$3`]($1)
I actually like that a lot
pretty nice 
u forgor the $ infront of the 2 in the replace on these :p
Oh right, I put a hashtag lul, let me fix
unrelated but @uncut dove whered you get that emoji from
I think I made the photo used, but the emoji itself is from my public server
What about the repo itself.
So it would do user/repo
I would have to test it to be sure, however I think you can just move the first parentheses back a few characters.
(https:\/\/github\.com\/([^\/]+\/[^\/]+)\/pull\/([0-9a-f]{1,}))
And it should work. I will test it tomorrow to be certain.
Fun fact, you don't need to put parenthesis around the whole match $& exist for that purpose
Issue
Find: https:\/\/github\.com\/[^\/]+\/[^\/]+\/issues\/([0-9a-f]{1,})
Replace: [`Issue #$1`]($&)
No Embed version
Find: https:\/\/github\.com\/[^\/]+\/[^\/]+\/issues\/([0-9a-f]{1,})
Replace: [`Issue #$1`](<$&>)
Pull Requests
Find: https:\/\/github\.com\/[^\/]+\/[^\/]+\/pull\/([0-9a-f]{1,})
Replace: [`Pull Request #$1`]($&)
No Embed Version
Find: https:\/\/github\.com\/[^\/]+\/[^\/]+\/pull\/([0-9a-f]{1,})
Replace: [`Pull Request #$1`](<$&>)
Oh cool, thank you! I am only just starting to learn RedEx(I am having a lot of fun with it), I found a really useful site that actually lets you put in your expression, tells you what each part of it will do, and lets you test it. So if anyone else also wants to try and make some of these, the website is https://regexr.com/
Actually, that might also solve this issue here, that way it will see if you <> the link it will mask, and if you don't, it won't
regexr is indeed one of the very good tool i use
@uncut dove
other idea, this but of org/creator name and repo
for example
https://github.com/Vendicated/Vencord
would be shortened to
Vendicated/Vencord
or
https://github.com/Vencord/Vesktop
would be shortened to
Vencord/Vesktop
-# of course they would have embeds I just removed them for this example