bitbucket2: Cast append_punctuation argument to str.

Commit ab8aae6d0c (#12161) incorrectly
assumed that ‘new’ is a string.  In the case of change == "links",
it’s a dict.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-01-26 13:57:22 -08:00
committed by Tim Abbott
parent 82081ddb95
commit af67eee3ea

View File

@@ -438,7 +438,7 @@ def get_repo_updated_body(payload: Dict[str, Any], include_title: bool) -> str:
old=old,
new=new,
)
message = append_punctuation(new, message) + "\n"
message = append_punctuation(str(new), message) + "\n"
body += message
elif new and not old:
message = BITBUCKET_REPO_UPDATED_ADDED.format(
@@ -447,7 +447,7 @@ def get_repo_updated_body(payload: Dict[str, Any], include_title: bool) -> str:
repo_name=repo_name,
new=new,
)
message = append_punctuation(new, message) + "\n"
message = append_punctuation(str(new), message) + "\n"
body += message
return body