We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f3394e commit a743ff5Copy full SHA for a743ff5
socketdev/repos/__init__.py
@@ -30,16 +30,16 @@ def to_dict(self):
30
def from_dict(cls, data: dict) -> "RepositoryInfo":
31
return cls(
32
id=data["id"],
33
- created_at=data["created_at"],
34
- updated_at=data["updated_at"],
35
- head_full_scan_id=data["head_full_scan_id"],
+ created_at=data.get("created_at", ""),
+ updated_at=data.get("updated_at", ""),
+ head_full_scan_id=data.get("head_full_scan_id", ""),
36
name=data["name"],
37
- description=data["description"],
38
- homepage=data["homepage"],
39
- visibility=data["visibility"],
40
- archived=data["archived"],
41
- default_branch=data["default_branch"],
42
- slug=data.get("slug"),
+ description=data.get("description", ""),
+ homepage=data.get("homepage", ""),
+ visibility=data.get("visibility", "private"),
+ archived=data.get("archived", False),
+ default_branch=data.get("default_branch", "main"),
+ slug=data["slug"]
43
)
44
45
socketdev/version.py
@@ -1 +1 @@
1
-__version__ = "2.0.9"
+__version__ = "2.0.10"
0 commit comments