From: Josh Durgin Date: Wed, 4 Aug 2021 00:05:50 +0000 (-0400) Subject: script/ceph-release-notes: infer actual title from ptl-tool merges X-Git-Tag: v17.1.0~1201^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b093ebbccbeb665c703f5772461c166e179a1b58;p=ceph.git script/ceph-release-notes: infer actual title from ptl-tool merges This helps the notes stay accurate when the commit title has changed, but the PR title is out of date. Signed-off-by: Josh Durgin --- diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index a9c2270ba0d99..db24a19345ec8 100755 --- a/src/script/ceph-release-notes +++ b/src/script/ceph-release-notes @@ -137,6 +137,10 @@ def _title_message(commit, pr, strict): # assume that a single line means the intention is to # re-write the PR title return (lines[0], None) + elif len(lines) < 3 and 'refs/pull' in lines[0]: + # assume the intent was rewriting the title and something like + # ptl-tool was used to generate the merge message + return (lines[1], None) message = " " + "\n ".join(lines) return (title, message)