Skip to content

Commit

Permalink
chore: Revert "refactor: issue body"
Browse files Browse the repository at this point in the history
This reverts commit 8a70014.
  • Loading branch information
Alc-Alc committed May 13, 2024
1 parent 8a70014 commit 8ce3fa6
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions src/byte/plugins/custom/litestar.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 8ce3fa6

Please sign in to comment.