mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
[HOTFIX] fix: make changelog discord publication not fail on missing 'labels' (#45779)
fix: make changelog discord publication not fail on missing 'labels' tag in changelog entry (which does not exist).
This commit is contained in:
parent
6b0154c86a
commit
e6ad92ca50
2 changed files with 4 additions and 2 deletions
|
|
@ -184,7 +184,8 @@ def generate_description_for_entries(entries: List[Any]) -> str:
|
|||
for entry in sorted(group, key=lambda x: x["time"]):
|
||||
for change in entry["changes"]:
|
||||
emoji = TYPES_TO_EMOJI.get(change["type"], "")
|
||||
if EXPERIMENTAL_LABEL in entry["labels"]:
|
||||
labels = entry.get("labels") or []
|
||||
if EXPERIMENTAL_LABEL in labels:
|
||||
emoji = f"{emoji}{EXPERIMENTAL_EMOJI}"
|
||||
msg = change["message"]
|
||||
desc.write(f"<li>{emoji} {html.escape(msg)}</li>")
|
||||
|
|
|
|||
|
|
@ -242,7 +242,8 @@ def changelog_entries_to_message_lines(entries: Iterable[ChangelogEntry]) -> lis
|
|||
emoji = TYPES_TO_EMOJI.get(change["type"], "❓")
|
||||
message = change["message"]
|
||||
|
||||
if EXPERIMENTAL_LABEL in entry["labels"]:
|
||||
labels = entry.get("labels") or []
|
||||
if EXPERIMENTAL_LABEL in labels:
|
||||
emoji = f"{emoji}{EXPERIMENTAL_EMOJI}"
|
||||
|
||||
message_lines.append(create_change_line(emoji, message, url))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue