From 54a65a011acabd694b7b5f02f8390c037f372d23 Mon Sep 17 00:00:00 2001 From: John Strunk Date: Thu, 13 Jun 2024 20:21:52 +0000 Subject: [PATCH] Return the summary as a single line in the API Signed-off-by: John Strunk --- summarize_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/summarize_api.py b/summarize_api.py index f1222db..e2c97e2 100755 --- a/summarize_api.py +++ b/summarize_api.py @@ -47,9 +47,11 @@ def summarize_issue(): issue_cache.remove_older_than(when) issue = issue_cache.get_issue(client, key) + summary = summarizer.summarize_issue(issue, max_depth=1) return { "key": key, - "summary": summarizer.summarize_issue(issue, max_depth=1), + # Convert the summary into a single line, removing newlines and extra spaces + "summary": " ".join(summary.split()), "user": get_jwt_identity(), }