Skip to content

Commit e3738cc

Browse files
Fix GitCommentHelpHandler not responding in monorepositories (#3048)
Fix GitCommentHelpHandler not responding in monorepositories This is a simple fix of the issue below. The two edited methods attempt to retrieve package configs, which aren't needed for the help handler. There may be a more elegant solution. Also, if there is a possibility that GithubAppInstallationHandler and GithubFasVerificationHandler are ever run in a monorepository, they would possibly be affected by the same issue. This has been tested locally on a generated Fedora Messaging message generated from a comment, so it should hopefully work. Fixes #3045 Reviewed-by: Matej Focko Reviewed-by: Nikola Forró Reviewed-by: Alžběta Kučerová Reviewed-by: gemini-code-assist[bot]
2 parents b40ddb2 + f84d0a2 commit e3738cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packit_service/worker/handlers/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def get_signature(cls, event: Event, job: Optional[JobConfig]) -> Signature:
464464
"package_config": dump_package_config(
465465
(
466466
event.packages_config.get_package_config_for(job)
467-
if event.packages_config
467+
if job and event.packages_config
468468
else None
469469
),
470470
),

packit_service/worker/result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def create_from(
3737
):
3838
package_config = (
3939
event.packages_config.get_package_config_for(job_config)
40-
if event.packages_config
40+
if job_config and event.packages_config
4141
else None
4242
)
4343
details = {

0 commit comments

Comments
 (0)