Skip to content

Commit

Permalink
oooops
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jun 18, 2024
1 parent 72336b7 commit bb47363
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Tools/actions_changelogs_since_last_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,22 @@ def send_to_discord(entries: Iterable[ChangelogEntry]) -> None:
print("No discord webhook URL found, skipping discord send")
return

content_string = io.StringIO()

for entry in entries:
content_string = io.StringIO()
for change in entry["changes"]:
emoji = TYPES_TO_EMOJI.get(change['type'], "❓")
message = change['message']
content_string.write(f"{emoji} {message}\n")
url = entry.get("url")
if url and url.strip():
content_string.write(f"[GitHub PR]({url})\n")
content_string.write(f"[GitHub Pull Request]({url})\n")

embed = {
"title": f"Автор: **{entry["author"]}**",
"description": content_string.getvalue(),
"color": 0x3498db
}

if len(content_string.getvalue()) > 0:
send_embed_discord(embed)

Expand Down

0 comments on commit bb47363

Please sign in to comment.