From b093ebbccbeb665c703f5772461c166e179a1b58 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 3 Aug 2021 20:05:50 -0400 Subject: [PATCH] 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 --- src/script/ceph-release-notes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index a9c2270ba0d..db24a19345e 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) -- 2.39.5