Skip to content

Commit 34ef5c7

Browse files
committed
Fixed Issues
1 parent 281e766 commit 34ef5c7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

kaizen/tests/actions/diff_pr_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pydantic import BaseModel, Field, ValidationError
1+
from pydantic import BaseModel, Field, ValidationError, StrictStr
22
import requests
33
from kaizen.reviewer.code_review import CodeReviewer
44
from kaizen.llms.provider import LLMProvider
@@ -17,8 +17,10 @@
1717

1818
# Pydantic model for validating inputs
1919
class PRRequestModel(BaseModel):
20-
owner: str = Field(..., regex=r"^[a-zA-Z0-9-]{1,39}$")
21-
repo: str = Field(..., regex=r"^[a-zA-Z0-9_.-]{1,100}$")
20+
owner: StrictStr = Field(..., min_length=1, max_length=39, regex=r"^[a-zA-Z0-9-]+$")
21+
repo: StrictStr = Field(
22+
..., min_length=1, max_length=100, regex=r"^[a-zA-Z0-9_.-]+$"
23+
)
2224
pr_number: int = Field(..., gt=0)
2325

2426

0 commit comments

Comments
 (0)