aboutsummaryrefslogtreecommitdiffstats
path: root/abbrevURL
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-03-27 16:27:37 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 17:12:18 +0100
commitb065fb7b1b7035b4693d21d413feabf411269c6f (patch)
tree57206a992b785bde4f6fd959fe35c49b0c811873 /abbrevURL
parentdb45774fe880cb1617bd13f818a0d104104b932c (diff)
downloadvim-suse-changes-b065fb7b1b7035b4693d21d413feabf411269c6f.tar.gz
fix(abbrevURL): correctly abbreviate commit URL to gh#foo/bar@IDno.
Diffstat (limited to 'abbrevURL')
-rwxr-xr-xabbrevURL2
1 files changed, 1 insertions, 1 deletions
diff --git a/abbrevURL b/abbrevURL
index 80cce41..7485eec 100755
--- a/abbrevURL
+++ b/abbrevURL
@@ -28,7 +28,7 @@ STR="$(echo "$STR" | sed -E -e 's@https?://github.com/(.*)/discussions/([0-9]+)@
# TODO STR=STR:gsub("https?://github.com/(.*)/commit/(%w+)", function (r, i)
# return "gh#" .. r .. "@" .. i:sub(1, 12)
# end)
-STR="$(echo "$STR" | sed -E -e 's!https?://github.com/(.*)/commit/([a-zA-Z0-9]+)!gh#\1#\2!')"
+STR="$(echo "$STR" | sed -E -e 's!https?://github.com/(.*)/commit/([a-zA-Z0-9]+)!gh#\1@\2!')"
STR="$(echo "$STR" | sed -E -e 's@https?://gitlab.com/(.*)/issues/([0-9]+)@gl#\1#\2@')"
STR="$(echo "$STR" | sed -E -e 's@https?://gitlab.com/(.*)/pull/([0-9]+)@gl#\1!\2@')"
STR="$(echo "$STR" | sed -E -e 's@https?://gitlab.com/(.*)/-/issues/([0-9]+)@gl#\1#\2@')"