]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-release-notes: infer actual title from ptl-tool merges
authorJosh Durgin <jdurgin@redhat.com>
Wed, 4 Aug 2021 00:05:50 +0000 (20:05 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 4 Aug 2021 17:56:21 +0000 (13:56 -0400)
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 <jdurgin@redhat.com>
src/script/ceph-release-notes

index a9c2270ba0d994d7b5c9c1d4f0c1bc56db3e07bb..db24a19345ec894725e9b57a4159fad3b7d4c912 100755 (executable)
@@ -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)