Lowercase repo name
This commit is contained in:
parent
83fb48d982
commit
89d9823992
1 changed files with 6 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ from enum import Enum
|
|||
from typing import Any, Optional
|
||||
|
||||
import httpx
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, validator
|
||||
|
||||
from .exceptions import NotFoundOnGitHub
|
||||
from .settings import settings
|
||||
|
|
@ -29,6 +29,11 @@ class CommitInfo(BaseModel):
|
|||
pr: Optional[int]
|
||||
git_commit: str
|
||||
|
||||
@validator("repo")
|
||||
@classmethod
|
||||
def validate_repo(cls, v: str) -> str:
|
||||
return v.lower()
|
||||
|
||||
|
||||
async def get_branch_info(repo: str, branch: str) -> CommitInfo:
|
||||
branch_data = await _github_request("GET", f"/repos/{repo}/git/ref/heads/{branch}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue