Skip to content

Commit 0824c89

Browse files
committed
fix(gitlab): support enconding of FileCheckStatus values without crash
1 parent b57af14 commit 0824c89

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

galaxy/core/mapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _map_data(self, compiled_mapping: Any, context: dict[str, Any]) -> Any:
5656
try:
5757
return compiled_mapping.input(context).first()
5858
except Exception as e:
59-
raise Exception(f"Error mapping with expression {compiled_mapping} and payload {compiled_mapping}: {e}")
59+
raise Exception(f"Error mapping with expression {compiled_mapping} and payload {context}: {e}") from e
6060
return compiled_mapping
6161

6262
def _map_entity(self, compiled_mapping: dict, json_data: dict[str, Any]) -> dict:

galaxy/integrations/gitlab/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import re
2+
from enum import StrEnum
23
from types import TracebackType
3-
from enum import Enum
44

55
from galaxy.core.galaxy import Integration, register
66
from galaxy.core.models import Config
@@ -21,7 +21,7 @@
2121
DEFAULT_BRANCH_NAME: str = "main"
2222

2323

24-
class FileCheckStatus(Enum):
24+
class FileCheckStatus(StrEnum):
2525
FILE_FOUND = "FILE_FOUND"
2626
FILE_NOT_FOUND = "FILE_NOT_FOUND"
2727
FILE_FOUND_NO_MATCH = "FILE_FOUND_NO_MATCH"

0 commit comments

Comments
 (0)