bugs-fixed-since: add argument to list StoryBoard entries
If enabled, this includes StoryBoard stories in the output, with a "storyboard:" prefix. Example output: $ ./bugs-fixed-since.py -sb -r ../octavia --start=1.0.0 storyboard:2001193 storyboard:2001424 1713873 storyboard:2001401 [...] This is disabled for compatibility with other tools parsing bugs-fixed-since output Change-Id: Iddde675254a8622d498cab581d522bffdd7fbaae
This commit is contained in:
parent
c2e34a5d06
commit
ebe10351b9
|
@ -767,7 +767,7 @@ features."
|
|||
bugs-fixed-since.py
|
||||
-------------------
|
||||
|
||||
List bugs mentioned in master commit messages starting from a specified commit.
|
||||
List Launchpad bugs mentioned in master commit messages starting from a specified commit.
|
||||
|
||||
Example::
|
||||
|
||||
|
@ -794,6 +794,12 @@ Example::
|
|||
|
||||
./bugs-fixed-since.py -e -r ../neutron --start=8.0.0
|
||||
|
||||
Use ``-sb`` option to also include StoryBoard bugs
|
||||
|
||||
Example::
|
||||
|
||||
./bugs-fixed-since.py -sb -r ../octavia --start=1.0.0
|
||||
|
||||
|
||||
lp-filter-bugs-by-importance.py
|
||||
-------------------------------
|
||||
|
|
|
@ -24,6 +24,7 @@ from git import Repo
|
|||
|
||||
|
||||
BUG_PATTERN = r'Bug:\s+#?(?P<bugnum>\d+)'
|
||||
STORYBOARD_PATTERN = r'Story:\s+#?(?P<storynum>\d+)'
|
||||
CHANGEID_PATTERN = r'Change-Id:\s+(?P<id>[0-9a-zA-Z]+)'
|
||||
|
||||
|
||||
|
@ -53,6 +54,12 @@ def _parse_args():
|
|||
default=False,
|
||||
help='whether to include easy (no git conflicts) backports only',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--include-storyboard', '-sb',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='whether to also include storyboard entries (stories)',
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
@ -128,6 +135,9 @@ def main():
|
|||
# collect every bug number mentioned in the message
|
||||
for match in re.finditer(BUG_PATTERN, commit.message):
|
||||
bugs.add(match.group('bugnum'))
|
||||
if args.include_storyboard:
|
||||
for match in re.finditer(STORYBOARD_PATTERN, commit.message):
|
||||
bugs.add('storyboard:' + match.group('storynum'))
|
||||
|
||||
for bug in bugs:
|
||||
print(bug)
|
||||
|
|
Loading…
Reference in New Issue