|
2 | 2 | from datetime import datetime |
3 | 3 | from typing import ClassVar |
4 | 4 |
|
| 5 | +from dlt.common import json |
5 | 6 | from dlt.common.libs.pydantic import DltConfig |
6 | 7 | from openhound.core.asset import BaseAsset, EdgeDef, NodeDef |
7 | 8 | from openhound.core.models.entries_dataclass import Edge, EdgePath, EdgeProperties |
|
16 | 17 | @dataclass |
17 | 18 | class GHAppInstallationProperties(GHNodeProperties): |
18 | 19 | """App installation properties and accordion panel queries. |
19 | | - |
| 20 | +
|
20 | 21 | Attributes: |
21 | 22 | id: The GitHub installation ID. |
22 | 23 | app_id: The GitHub App's numeric ID (shared across all installations of the same app). |
@@ -140,10 +141,8 @@ def as_node(self) -> GHNode: |
140 | 141 | repositories_url=self.repositories_url, |
141 | 142 | repository_selection=self.repository_selection, |
142 | 143 | target_type=self.target_type, |
143 | | - permissions=self.permissions |
144 | | - if isinstance(self.permissions, str) |
145 | | - else None, |
146 | | - events=self.events if isinstance(self.events, str) else None, |
| 144 | + permissions=json.dumps(self.permissions) if self.permissions else None, |
| 145 | + events=json.dumps(self.events) if self.events else None, |
147 | 146 | created_at=self.created_at, |
148 | 147 | updated_at=self.updated_at, |
149 | 148 | suspended_at=self.suspended_at, |
@@ -195,7 +194,7 @@ def edges(self): |
195 | 194 | @dataclass |
196 | 195 | class GHAppProperties(GHNodeProperties): |
197 | 196 | """App definition properties and accordion panel queries. |
198 | | - |
| 197 | +
|
199 | 198 | Attributes: |
200 | 199 | id: The GitHub App's numeric ID. |
201 | 200 | client_id: The app's OAuth client ID. |
|
0 commit comments