]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-release-notes: don't include PR body by default, just the title 42619/head
authorJosh Durgin <jdurgin@redhat.com>
Wed, 4 Aug 2021 00:07:13 +0000 (20:07 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 4 Aug 2021 17:56:21 +0000 (13:56 -0400)
This avoids overly long output for merges involving lots of PRs,
e.g. cephadm batch backports.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/script/ceph-release-notes

index db24a19345ec894725e9b57a4159fad3b7d4c912..7b6525f38d7cd91f2cf1e9f6814edeadb2399421 100755 (executable)
@@ -144,7 +144,7 @@ def _title_message(commit, pr, strict):
     message = "    " + "\n    ".join(lines)
     return (title, message)
 
-def make_release_notes(gh, repo, ref, plaintext, html, markdown, verbose, strict, use_tags):
+def make_release_notes(gh, repo, ref, plaintext, html, markdown, verbose, strict, use_tags, include_pr_messages):
 
     issue2prs = {}
     pr2issues = {}
@@ -308,7 +308,7 @@ def make_release_notes(gh, repo, ref, plaintext, html, markdown, verbose, strict
                     author=author, pr=pr
                 )
             )
-        if message:
+        if include_pr_messages and message:
             print (message)
 
 
@@ -354,6 +354,8 @@ if __name__ == "__main__":
     )
     parser.add_argument("--use-tags", default=False,
                         help="Use github tags to guess the component")
+    parser.add_argument("--include-pr-messages", default=False, action='store_true',
+                        help="Include full PR message in addition to PR title, if available")
 
     args = parser.parse_args()
     gh = github.GitHub(
@@ -368,5 +370,6 @@ if __name__ == "__main__":
         args.markdown,
         args.verbose,
         args.strict,
-        args.use_tags
+        args.use_tags,
+        args.include_pr_messages
     )