From 1ed820c26d1a4ac483dfc1e22635abd9178b908b Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 22 May 2025 18:43:46 +0000 Subject: [PATCH 1/7] Auto-updated version from 1.0.9b1 to 1.0.9b1.dev0 --- PyBugReporter/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyBugReporter/_version.py b/PyBugReporter/_version.py index 2180e43..98075c7 100644 --- a/PyBugReporter/_version.py +++ b/PyBugReporter/_version.py @@ -1 +1 @@ -__version__ = '1.0.9b1' \ No newline at end of file +__version__ = '1.0.9b1.dev0' \ No newline at end of file From a7f9167efc8d9cd8d0cc0dfd9640469463a04423 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 23 May 2025 15:39:57 +0000 Subject: [PATCH 2/7] Auto-updated version from 1.0.10 to 1.0.10b0 --- PyBugReporter/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyBugReporter/_version.py b/PyBugReporter/_version.py index 36f0696..7b041b7 100644 --- a/PyBugReporter/_version.py +++ b/PyBugReporter/_version.py @@ -1 +1 @@ -__version__ = '1.0.10' \ No newline at end of file +__version__ = '1.0.10b0' \ No newline at end of file From 1d1c0f9ed3305530408159b2ee85df0c3a8f83de Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 23 May 2025 15:39:58 +0000 Subject: [PATCH 3/7] Auto-updated version from 1.0.10b0 to 1.0.10b0.dev0 --- PyBugReporter/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyBugReporter/_version.py b/PyBugReporter/_version.py index 7b041b7..2f61bf7 100644 --- a/PyBugReporter/_version.py +++ b/PyBugReporter/_version.py @@ -1 +1 @@ -__version__ = '1.0.10b0' \ No newline at end of file +__version__ = '1.0.10b0.dev0' \ No newline at end of file From 61f32197cc6c13543e56bbd1116906b3cb866927 Mon Sep 17 00:00:00 2001 From: Elijah Date: Mon, 26 May 2025 12:24:50 -0600 Subject: [PATCH 4/7] fixed manual bug report, also added discord stuff --- PyBugReporter/src/BugReporter.py | 9 +++- test.py | 82 +++++++++++++++++--------------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/PyBugReporter/src/BugReporter.py b/PyBugReporter/src/BugReporter.py index e1ac717..2e5754a 100644 --- a/PyBugReporter/src/BugReporter.py +++ b/PyBugReporter/src/BugReporter.py @@ -381,7 +381,7 @@ def manualBugReport(cls, repoName: str, errorTitle: str, errorMessage: str) -> N headers = {"Authorization": f"Bearer {handler.githubKey}"} # query variables - repoId = cls._getRepoId(cls, handler) + repoId = asyncio.run(cls._getRepoId_async(cls, handler)) bugLabel = "LA_kwDOJ3JPj88AAAABU1q15w" autoLabel = "LA_kwDOJ3JPj88AAAABU1q2DA" @@ -414,7 +414,12 @@ def manualBugReport(cls, repoName: str, errorTitle: str, errorMessage: str) -> N } } - issueExists = cls._checkIfIssueExists(cls, handler, errorTitle) + issueExists = asyncio.run(cls._checkIfIssueExists_async(cls, handler, errorTitle)) + + # Send to Discord if applicable + if cls.handlers[repoName].useDiscord: + discordBot = DiscordBot(cls.handlers[repoName].botToken, cls.handlers[repoName].channelId) + asyncio.run(discordBot.send_message(f"## {repoName}: {errorTitle}\n{errorMessage}", issueExists)) if (issueExists == False): result = asyncio.run(client.execute_async(query=createIssue, variables=variables, headers=headers)) diff --git a/test.py b/test.py index 009d8a2..342c90e 100644 --- a/test.py +++ b/test.py @@ -16,6 +16,10 @@ BugReporter.setVars(token, 'PyBugReporter', 'byuawsfhtl', False, True, discordToken, channelId) + BugReporter.manualBugReport("PyBugReporter", + "Testing manual bug report", + "This is a test of the manual bug report functionality") + @BugReporter('PyBugReporter', extraInfo=True, env='test') def test(item, item2=None): # raise Exception(""" @@ -53,43 +57,45 @@ def test(item, item2=None): # really really really really really really really really long test exception # """) - def this(): - def exception(): - def has(): - def an(): - def insane(): - def traceback(): - def length(): - def that(): - def just(): - def keeps(): - def going(): - def on(): - def yep(): - def still(): - def more(): - def never(): - def do(): - def this(): - raise Exception("This is a test exception") - this() - do() - never() - more() - still() - yep() - on() - going() - keeps() - just() - that() - length() - traceback() - insane() - an() - has() - exception() - this() + # def this(): + # def exception(): + # def has(): + # def an(): + # def insane(): + # def traceback(): + # def length(): + # def that(): + # def just(): + # def keeps(): + # def going(): + # def on(): + # def yep(): + # def still(): + # def more(): + # def never(): + # def do(): + # def this(): + # raise Exception("This is a test exception") + # this() + # do() + # never() + # more() + # still() + # yep() + # on() + # going() + # keeps() + # just() + # that() + # length() + # traceback() + # insane() + # an() + # has() + # exception() + # this() + + raise Exception("This is a test exception") - test(None, item2='item2') \ No newline at end of file + # test(None, item2='item2') \ No newline at end of file From c4845d2d2feaa923a3998b3044cbcbf7933bffdd Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 27 May 2025 22:22:22 +0000 Subject: [PATCH 5/7] Auto-updated version from 1.0.10b0.dev0 to 1.0.10b0.dev1 --- PyBugReporter/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyBugReporter/_version.py b/PyBugReporter/_version.py index 2f61bf7..f4d9dfe 100644 --- a/PyBugReporter/_version.py +++ b/PyBugReporter/_version.py @@ -1 +1 @@ -__version__ = '1.0.10b0.dev0' \ No newline at end of file +__version__ = '1.0.10b0.dev1' \ No newline at end of file From 7eac5e198670954e14651ed91d6bbc090998c411 Mon Sep 17 00:00:00 2001 From: Jonathan Christensen Date: Wed, 17 Sep 2025 16:23:57 -0600 Subject: [PATCH 6/7] Added async manual bug report --- PyBugReporter/src/BugReporter.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/PyBugReporter/src/BugReporter.py b/PyBugReporter/src/BugReporter.py index 2e5754a..231dbe1 100644 --- a/PyBugReporter/src/BugReporter.py +++ b/PyBugReporter/src/BugReporter.py @@ -366,6 +366,17 @@ async def _getRepoId_async(self, handler: BugHandler) -> str: def manualBugReport(cls, repoName: str, errorTitle: str, errorMessage: str) -> None: """Manually sends a bug report to the Github repository. + Args: + repoName (str): the name of the repo to report to + errorTitle (str): the title of the error + errorMessage (str): the error message + """ + asyncio.run(cls.manualBugReportAsync(repoName,errorTitle,errorMessage)) + + @classmethod + async def manualBugReportAsync(cls, repoName: str, errorTitle: str, errorMessage: str) -> None: + """Manually sends a bug report to the Github repository. + Args: repoName (str): the name of the repo to report to errorTitle (str): the title of the error @@ -381,7 +392,7 @@ def manualBugReport(cls, repoName: str, errorTitle: str, errorMessage: str) -> N headers = {"Authorization": f"Bearer {handler.githubKey}"} # query variables - repoId = asyncio.run(cls._getRepoId_async(cls, handler)) + repoId = await cls._getRepoId_async(cls, handler) bugLabel = "LA_kwDOJ3JPj88AAAABU1q15w" autoLabel = "LA_kwDOJ3JPj88AAAABU1q2DA" @@ -414,15 +425,15 @@ def manualBugReport(cls, repoName: str, errorTitle: str, errorMessage: str) -> N } } - issueExists = asyncio.run(cls._checkIfIssueExists_async(cls, handler, errorTitle)) + issueExists = await cls._checkIfIssueExists_async(cls, handler, errorTitle) # Send to Discord if applicable if cls.handlers[repoName].useDiscord: discordBot = DiscordBot(cls.handlers[repoName].botToken, cls.handlers[repoName].channelId) - asyncio.run(discordBot.send_message(f"## {repoName}: {errorTitle}\n{errorMessage}", issueExists)) + await discordBot.send_message(f"## {repoName}: {errorTitle}\n{errorMessage}", issueExists) if (issueExists == False): - result = asyncio.run(client.execute_async(query=createIssue, variables=variables, headers=headers)) + result = await client.execute_async(query=createIssue, variables=variables, headers=headers) print('\nThis error has been reported to the Tree Growth team.\n') else: print('\nOur team is already aware of this issue.\n') From ac16e06384a6621417af495c4c6f03d9594f78bd Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 19 Sep 2025 21:43:02 +0000 Subject: [PATCH 7/7] Auto-updated version from 1.0.10b0.dev1 to 1.0.10b0.dev2 --- PyBugReporter/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyBugReporter/_version.py b/PyBugReporter/_version.py index f4d9dfe..85fb3bc 100644 --- a/PyBugReporter/_version.py +++ b/PyBugReporter/_version.py @@ -1 +1 @@ -__version__ = '1.0.10b0.dev1' \ No newline at end of file +__version__ = '1.0.10b0.dev2' \ No newline at end of file