Skip to content

Commit 0743c03

Browse files
Ensure the stg / prod instance run the help handler in the right context (#3050)
Ensure the stg / prod instance run the help handler in the right context As of now, the staging instance reacts to help commands intended for the production instance and vice versa. This fixes it. Reviewed-by: gemini-code-assist[bot] Reviewed-by: Nikola Forró Reviewed-by: Laura Barcziová
2 parents 1d0c869 + 49dd7ac commit 0743c03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packit_service/worker/jobs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,12 @@ def retrieve_comment_command_prefix(self, comment: str) -> Optional[str]:
13631363
Returns:
13641364
Packit comment command prefix or None if none is found.
13651365
"""
1366-
prefixes = ["/packit-ci-stg", "/packit-ci", "/packit-stg", "/packit"]
1366+
prefixes = None
1367+
1368+
if self.service_config.comment_command_prefix == "/packit-stg":
1369+
prefixes = ["/packit-ci-stg", "/packit-stg"]
1370+
else:
1371+
prefixes = ["/packit-ci", "/packit"]
13671372

13681373
for prefix in prefixes:
13691374
if comment.startswith(prefix):

0 commit comments

Comments
 (0)