mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-23 06:20:44 +02:00
contrib/bzutil: extend parsing of Related: bugs in commit message
Allow more ways to specify "related" bugs, that work better inside a sentance. The following formats are now detected too: - "related to bgo#XXXXX" - "related to bug bgo#XXXXX" - "related to http://..." - "related to bug http://..." - and possibly newline instead of a single white space Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
25baa94b3b
commit
0e889246ce
1 changed files with 1 additions and 1 deletions
|
|
@ -592,7 +592,7 @@ class BzInfoRhbz(BzInfo):
|
|||
|
||||
class UtilParseCommitMessage:
|
||||
|
||||
_p_related = '(?P<related>([rR]elated(:[ \t]*|[ \t]+))?)'
|
||||
_p_related = '(?P<related>([rR]elated(:[ \t]*|[ \t]+|( |\n)to( |\n)(bug( |\n))?))?)'
|
||||
_patterns = [
|
||||
('(^|\W)(?P<replace>'+_p_related+'(?P<type>bgo)[ ]?[#]?(?P<id>[0-9]{4,7}))($|\W)', lambda m: BzInfoBgo(m.group('id'),related=m.group('related'))),
|
||||
('(^|\W)(?P<replace>'+_p_related+'https://bugzilla\.gnome\.org/show_bug\.cgi\?id=(?P<id>[0-9]{4,7}))($|\W)', lambda m: BzInfoBgo(m.group('id'),related=m.group('related'))),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue