From 8ce3fa630ab5042755f40e3591468e7e8df90b2e Mon Sep 17 00:00:00 2001 From: Alc-Alc Date: Mon, 13 May 2024 21:14:38 +0530 Subject: [PATCH] chore: Revert "refactor: issue body" This reverts commit 8a70014a59c9d87446596eac9bfbc433d5a8e3da. --- src/byte/plugins/custom/litestar.py | 37 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/byte/plugins/custom/litestar.py b/src/byte/plugins/custom/litestar.py index a9856ab..96967f2 100644 --- a/src/byte/plugins/custom/litestar.py +++ b/src/byte/plugins/custom/litestar.py @@ -1,7 +1,6 @@ """Custom plugins for the Litestar Discord.""" from __future__ import annotations -from textwrap import dedent from typing import Self from discord import Embed, Interaction, Message, TextStyle, app_commands @@ -54,24 +53,24 @@ def __init__( async def on_submit(self, interaction: Interaction) -> None: issue_reporter = interaction.user - issue_body = dedent( - f""" - ### Reported by - [{issue_reporter.display_name}](https://discord.com/users/{issue_reporter.id})""" - f""" in Discord ([#{interaction.channel.name}]({self.jump_url})) - - ### Description - {self.description.value.strip()} - - ### MCVE - {self.mcve.value.strip()} - - ### Logs - {self.logs.value.strip()} - - ### Litestar Version - {self.version.value.strip()}""" - ).strip() + issue_body_lines = [ + "### Reported by", + f"[{issue_reporter.display_name}](https://discord.com/users/{issue_reporter.id}) in ", + f"Discord [message link]({self.jump_url}): {interaction.channel.name})", + "", + "### Description", + f"{self.description.value.strip()}", + "", + "### MCVE", + f"{self.mcve.value.strip()}", + "", + "### Logs", + f"{self.logs.value.strip()}", + "", + "### Litestar Version", + f"{self.version.value.strip()}", + ] + issue_body = "\n".join(issue_body_lines) try: response_wrapper = await github_client.rest.issues.async_create( owner="litestar-org", repo="litestar", data={"title": self.title_.value, "body": issue_body}