aboutsummaryrefslogtreecommitdiffstats
path: root/abbrevURL
diff options
context:
space:
mode:
Diffstat (limited to 'abbrevURL')
-rwxr-xr-xabbrevURL5
1 files changed, 5 insertions, 0 deletions
diff --git a/abbrevURL b/abbrevURL
index 24f74c9..21a391e 100755
--- a/abbrevURL
+++ b/abbrevURL
@@ -1,4 +1,7 @@
#!/usr/bin/lua
+-- Abbreviate according to
+-- https://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations
+
local str = ''
if #arg == 0 then
@@ -12,6 +15,8 @@ str = str:gsub("https?://github.com/(.*)/pull/(%d+)", "gh#%1#%2")
str = str:gsub("https?://gitlab.com/(.*)/-/issues/(%d+)", "gl#%1#%2")
str = str:gsub("https?://gitlab.com/(.*)/issues/(%d+)", "gl#%1#%2")
str = str:gsub("https?://gitlab.com/(.*)/pull/(%d+)", "gl#%1#%2")
+str = str:gsub("https?://gitlab.com/(.*)/-/pull/(%d+)", "gl#%1#%2")
+str = str:gsub("https?://gitlab.com/(.*)/-/merge-requests/(%d+)", "gl#%1#%2")
str = str:gsub("https?://sourceforge.net/support/tracker.php%?aid=(%d+)", "sh#%1")
str = str:gsub("https?://sf.net/support/tracker.php%?aid=(%d+)", "sh#%1")
str = str:gsub("https?://sourceforge.net/p/(.*)/patches/(%d+)/", "shp#%1#%2")