fix(issues): fixed title generation
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Seaswimmer 2023-08-19 17:30:16 -04:00
parent 4f90076c37
commit 2087bdd054
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -223,11 +223,11 @@ class Issues(commands.Cog):
for field in embed.fields: for field in embed.fields:
field_names.append(f"**{field.name}**") field_names.append(f"**{field.name}**")
field_values.append(field.value) field_values.append(field.value)
if embed.footer.text == "Bot Bug Report": if embed.author.name == "Bot Bug Report":
issue_title = f"[BOT BUG] Automatically generated issue" issue_title = f"[BOT BUG] Automatically generated issue"
elif embed.footer.text == "Bot Suggestion": elif embed.author.name == "Bot Suggestion":
issue_title = f"[BOT SUGGESTION] Automatically generated issue" issue_title = f"[BOT SUGGESTION] Automatically generated issue"
elif embed.footer.text == "Cog Bug Report" or embed.footer.text == "Cog Suggestion": elif embed.author.name == "Cog Bug Report" or embed.author.name == "Cog Suggestion":
issue_title = f"[{field_values[0]}] Automatically generated issue" issue_title = f"[{field_values[0]}] Automatically generated issue"
headers = { headers = {
"Authorization": f"Bearer {await self.config.gitea_token()}", "Authorization": f"Bearer {await self.config.gitea_token()}",