commit be60ab716b0589ea15c24fe509eaa0eba066fb7f
parent 40f20dde22bf8668b7407ebaf8972138348ca0c8
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date: Sun, 24 Jun 2018 17:08:30 +0200
Add trackers from gtk3-devel changelog
Leaving out:
- 'bog' because it looks like a typo,
- 'commit' because I cannot think of a way to make it work in the
general case.
Diffstat:
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/.config/terminator/plugins/susechangelog.py b/.config/terminator/plugins/susechangelog.py
@@ -8,37 +8,32 @@ AVAILABLE = ['SuseTrackersURLHandler']
_TRACKERS = {
+ 'bgo': 'https://bugzilla.gnome.org/show_bug.cgi?id={}',
+ 'bmo': 'https://bugzilla.mozilla.org/show_bug.cgi?id={}',
+ 'bnc': 'https://bugzilla.novell.com/show_bug.cgi?id={}',
+ 'boo': 'https://bugzilla.opensuse.org/show_bug.cgi?id={}',
'bsc': 'https://bugzilla.suse.com/show_bug.cgi?id={}',
'fate': 'https://features.opensuse.org/{}',
- 'fdo': 'https://bugs.freedesktop.org/show_bug.cgi?id={}'
+ 'fdo': 'https://bugs.freedesktop.org/show_bug.cgi?id={}',
+ 'glgo#gnome/gtk': 'https://gitlab.gnome.org/GNOME/gtk/issues/{}',
+ 'kde': 'https://bugs.kde.org/show_bug.cgi?id={}'
}
-_MATCH = r'(?i)(?P<tracker>{t})#(?P<id>{i})'.format(
+_PATTERN = r'(?i)(?P<tracker>{t})#(?P<id>{i})'.format(
t='|'.join(_TRACKERS),
i='[0-9]+(?:#c[0-9]+)?'
)
+_REGEX = re.compile(_PATTERN)
+
class SuseTrackersURLHandler(URLHandler):
capabilities = ['url_handler']
handler_name = 'suse_rpm_trackers'
- match = r'\b'+_MATCH+r'\b'
+ match = r'\b'+_PATTERN+r'\b'
def callback(self, ref):
- fields = re.match(_MATCH, ref).groupdict()
+ fields = _REGEX.match(ref).groupdict()
template = _TRACKERS[fields['tracker'].lower()]
bug_id = fields['id']
return template.format(bug_id)
-
-
-# Other ideas from gtk3-devel's changelog:
-# bgo#N
-# bmo#N
-# bnc#N
-# bog#N
-# boo#N
-# bsc#N
-# bug#N
-# commit#X
-# glgo#GNOME/GTK#N
-# kde#N