From: Abhishek Lekshmanan Date: Wed, 19 Apr 2017 08:40:19 +0000 (+0200) Subject: script: ceph-release-notes: minor fixes for split_component X-Git-Tag: v13.0.1~420^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=35876bb79d55556fa6b1d1402eb0bd48a3cdf0d9;p=ceph-ci.git script: ceph-release-notes: minor fixes for split_component make labels a set as intersection would fail otherwise, also sort the results of prefixes before creating the title Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index 2148ed3f1cc..4bb3b430dbd 100755 --- a/src/script/ceph-release-notes +++ b/src/script/ceph-release-notes @@ -38,9 +38,9 @@ from git import Repo fixes_re = re.compile(r"Fixes\:? #(\d+)") reviewed_by_re = re.compile(r"Rev(.*)By", re.IGNORECASE) # labels is the list of relevant labels defined for github.com/ceph/ceph -labels = ['bluestore', 'build/ops', 'cephfs', 'common', 'core', 'mgr', +labels = {'bluestore', 'build/ops', 'cephfs', 'common', 'core', 'mgr', 'mon', 'performance', 'pybind', 'rdma', 'rgw', 'rbd', 'tests', - 'tools'] + 'tools'} merge_re = re.compile("Merge pull request #(\d+).*") # prefixes is the list of commit description prefixes we recognize prefixes = ['bluestore', 'build/ops', 'cephfs', 'cephx', 'cli', 'cmake', @@ -105,9 +105,9 @@ def split_component(title, gh, number): issue_labels = {it['name'] for it in issue['labels']} if 'documentation' in issue_labels: return 'doc: ' + title - item = labels.intersection(issue_labels) + item = set(prefixes).intersection(issue_labels) if item: - return ",".join(item) + ': ' + title + return ",".join(sorted(item)) + ': ' + title else: return 'UNKNOWN: ' + title