PyBugReporter 1.0.13__tar.gz → 1.0.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PKG-INFO +1 -1
- pybugreporter-1.0.15/PyBugReporter/_version.py +1 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/src/BugReporter.py +2 -2
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/src/DiscordBot.py +5 -2
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter.egg-info/PKG-INFO +1 -1
- pybugreporter-1.0.13/PyBugReporter/_version.py +0 -1
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/LICENSE +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/__init__.py +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/py.typed +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/requirements.txt +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/src/__init__.py +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter/src/py.typed +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter.egg-info/SOURCES.txt +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter.egg-info/dependency_links.txt +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter.egg-info/requires.txt +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/PyBugReporter.egg-info/top_level.txt +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/README.md +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/setup.cfg +0 -0
- {pybugreporter-1.0.13 → pybugreporter-1.0.15}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyBugReporter
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.15
|
|
4
4
|
Summary: A python library for catching thrown exceptions and automatically creating issues on a GitHub repo.
|
|
5
5
|
Home-page: https://github.com/byuawsfhtl/PyBugReporter.git
|
|
6
6
|
Author: Record Linking Lab
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.0.15'
|
|
@@ -264,7 +264,7 @@ class BugReporter:
|
|
|
264
264
|
# Send to Discord if applicable
|
|
265
265
|
if self.handlers[repoName].useDiscord:
|
|
266
266
|
discordBot = DiscordBot(self.handlers[repoName].botToken, self.handlers[repoName].channelId)
|
|
267
|
-
await discordBot.send_message(shortErrorMessage, issueExists)
|
|
267
|
+
await discordBot.send_message(shortErrorMessage, issueExists, errorTitle)
|
|
268
268
|
|
|
269
269
|
if (not issueExists):
|
|
270
270
|
result = await client.execute_async(query=createIssue, variables=variables, headers=headers)
|
|
@@ -481,7 +481,7 @@ class BugReporter:
|
|
|
481
481
|
# Send to Discord if applicable
|
|
482
482
|
if cls.handlers[repoName].useDiscord:
|
|
483
483
|
discordBot = DiscordBot(cls.handlers[repoName].botToken, cls.handlers[repoName].channelId)
|
|
484
|
-
await discordBot.send_message(f"## {repoName}: {errorTitle}\n{errorMessage}", issueExists)
|
|
484
|
+
await discordBot.send_message(f"## {repoName}: {errorTitle}\n{errorMessage}", issueExists, errorTitle)
|
|
485
485
|
|
|
486
486
|
if (issueExists == False):
|
|
487
487
|
result = await client.execute_async(query=createIssue, variables=variables, headers=headers)
|
|
@@ -27,6 +27,7 @@ class DiscordBot(discord.Client):
|
|
|
27
27
|
self.channelId = int(channelId)
|
|
28
28
|
self._message = None
|
|
29
29
|
self._alreadySent = False
|
|
30
|
+
self._title = None
|
|
30
31
|
self._doneFuture = None
|
|
31
32
|
|
|
32
33
|
intents = discord.Intents(emojis = True,
|
|
@@ -36,16 +37,18 @@ class DiscordBot(discord.Client):
|
|
|
36
37
|
guilds = True)
|
|
37
38
|
super().__init__(intents=intents)
|
|
38
39
|
|
|
39
|
-
async def send_message(self, message, alreadySent = False):
|
|
40
|
+
async def send_message(self, message, alreadySent = False, title = None):
|
|
40
41
|
"""
|
|
41
42
|
Sends a message to the specified channel by setting the variables and starting the bot, then turning it off when finished.
|
|
42
43
|
|
|
43
44
|
Args:
|
|
44
45
|
message (str): The message to send.
|
|
45
46
|
alreadySent (bool): Whether the message has already been sent.
|
|
47
|
+
title (str): The stable error title used to find the original message when reacting.
|
|
46
48
|
"""
|
|
47
49
|
self._message = message
|
|
48
50
|
self._alreadySent = alreadySent
|
|
51
|
+
self._title = title
|
|
49
52
|
self._doneFuture = asyncio.get_running_loop().create_future()
|
|
50
53
|
print("Starting bot...")
|
|
51
54
|
# Start the bot as a background task
|
|
@@ -64,7 +67,7 @@ class DiscordBot(discord.Client):
|
|
|
64
67
|
print(f"Sent message to channel {self.channelId}")
|
|
65
68
|
elif channel and self._alreadySent:
|
|
66
69
|
async for message in channel.history(limit=HISTORY_LIMIT):
|
|
67
|
-
if
|
|
70
|
+
if self._title and self._title in message.content:
|
|
68
71
|
await message.add_reaction(EMOJI)
|
|
69
72
|
break
|
|
70
73
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyBugReporter
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.15
|
|
4
4
|
Summary: A python library for catching thrown exceptions and automatically creating issues on a GitHub repo.
|
|
5
5
|
Home-page: https://github.com/byuawsfhtl/PyBugReporter.git
|
|
6
6
|
Author: Record Linking Lab
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.0.13'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|