From: Nathan Cutler Date: Sun, 26 Mar 2017 16:32:00 +0000 (+0200) Subject: tools: ceph-release-notes: add and use prefixes list X-Git-Tag: v12.0.2~226^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86993d1847be5e3247089137ce71f2f36c70a7be;p=ceph.git tools: ceph-release-notes: add and use prefixes list Put all the recognized prefixes in one place for ease of maintenance. Signed-off-by: Nathan Cutler --- diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index d650ccf92cd9..102556f7904d 100755 --- a/src/script/ceph-release-notes +++ b/src/script/ceph-release-notes @@ -36,6 +36,10 @@ from git import Repo fixes_re = re.compile(r"Fixes\:? #(\d+)") merge_re = re.compile("Merge pull request #(\d+).*") +prefixes = [ 'bluestore', 'build/ops', 'cephfs', 'cephx', 'cli', 'cmake', + 'common', 'core', 'crush', 'doc', 'fs', 'librados', 'librbd', + 'log', 'mds', 'mgr', 'mon', 'msgr', 'objecter', 'osd', 'rbd', + 'pybind', 'rgw', 'tests', 'tools' ] signed_off_re = re.compile("Signed-off-by: (.+) <") tracker_re = re.compile("http://tracker.ceph.com/issues/(\d+)") tracker_uri = "http://tracker.ceph.com/issues/{0}.json" @@ -71,7 +75,7 @@ def get_original_issue(issue, verbose): return issue def split_component(title,gh,number): - title_re = '(bluestore|build/ops|cephfs|cmake|core|common|crush|cli|doc|fs|librados|mds|mon|msgr|mgr|osd|log|librbd|rbd|objecter|pybind|rgw|tests|tools)(:.*)' + title_re = '(' + '|'.join(prefixes) + ')(:.*)' match = re.match(title_re, title) if match: return match.group(1)+match.group(2) @@ -147,7 +151,7 @@ def make_release_notes(gh, repo, ref, plaintext, verbose, strict, use_tags): continue if strict: - title_re = '^(?:hammer|infernalis|jewel|kraken):\s+(cephx|cli|common|mon|msgr|osd|log|librbd|rbd|fs|mds|objecter|rgw|build/ops|tests|tools|cmake|doc|crush|librados)(:.*)' + title_re = '^(?:hammer|infernalis|jewel|kraken):\s+(' + '|'.join(prefixes) + ')(:.*)' match = re.match(title_re, title) if not match: print ("ERROR: https://github.com/ceph/ceph/pull/" + str(number) + " title " + title.encode("utf-8") + " does not match " + title_re)