From 0babd1b2f53fdb676c3a07b247bf217b89774d88 Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Mar 15 2019 15:28:25 +0000 Subject: More specific expression for bug search Signed-off-by: Ondrej Nosek --- diff --git a/fedpkg/cli.py b/fedpkg/cli.py index a41304f..26f7b79 100644 --- a/fedpkg/cli.py +++ b/fedpkg/cli.py @@ -684,7 +684,7 @@ targets to build the package for a particular stream. bodhi_args['bugs'] = ','.join(self.args.bugs) else: # Extract bug numbers from the latest changelog entry - bugs = re.findall(r'#([0-9]*)', clog) + bugs = re.findall(r'#([0-9]+)', clog) if bugs: bodhi_args['bugs'] = ','.join(bugs) diff --git a/test/test_cli.py b/test/test_cli.py index 40d9ac2..dc330ae 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -122,7 +122,7 @@ class TestUpdate(CliTestCase): self.fake_clog = list(six.moves.map(six.u, [ 'Add tests for command update', 'New command update - #1000', - 'Fix tests - #2000', + 'Fix tests - #2000, #notabug', '处理一些Unicode字符číář', ])) clog_file = os.path.join(self.cloned_repo_path, 'clog')