Skip to content

Commit 969ce6e

Browse files
authored
Merge pull request #30 from jpodivin/relaxing_schema
Relaxing the schema
2 parents 0369849 + c24d57f commit 969ce6e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/logdetective_packit/models.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from datetime import datetime
2+
from typing import Optional
23
from pydantic import BaseModel, Field
34
import enum
45

@@ -15,9 +16,12 @@ class BuildInfo(BaseModel):
1516
)
1617
build_system: str = Field(description="System where the build was launched")
1718
project_url: str = Field(description="URL of the project being analyzed")
18-
commit_sha: str = Field(description="SHA of the commit used as basis of the build")
19-
pr_id: int = Field(
20-
description="ID of the pull request, or equivalent of the given forge"
19+
commit_sha: Optional[str] = Field(
20+
description="SHA of the commit used as basis of the build", default=None
21+
)
22+
pr_id: Optional[int] = Field(
23+
description="ID of the pull request, or equivalent of the given forge",
24+
default=None,
2125
)
2226

2327

0 commit comments

Comments
 (0)