Initial upload: DevDash CLI with TUI dashboard
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
50
src/models/entities.py
Normal file
50
src/models/entities.py
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
from pydantic import BaseModel
|
||||||
|
from typing import Optional, List
|
||||||
|
from datetime import datetime
|
||||||
|
from src.models.types import Provider, IssueStatus, WorkflowStatus, PRStatus
|
||||||
|
|
||||||
|
|
||||||
|
class Repository(BaseModel):
|
||||||
|
name: str
|
||||||
|
owner: str
|
||||||
|
full_name: str
|
||||||
|
provider: Provider
|
||||||
|
url: str = ""
|
||||||
|
|
||||||
|
|
||||||
|
class PullRequest(BaseModel):
|
||||||
|
number: int
|
||||||
|
title: str
|
||||||
|
author: str
|
||||||
|
status: PRStatus
|
||||||
|
draft: bool = False
|
||||||
|
labels: List[str] = []
|
||||||
|
url: str = ""
|
||||||
|
created_at: Optional[datetime] = None
|
||||||
|
|
||||||
|
|
||||||
|
class Issue(BaseModel):
|
||||||
|
number: int
|
||||||
|
title: str
|
||||||
|
author: str
|
||||||
|
status: IssueStatus
|
||||||
|
labels: List[str] = []
|
||||||
|
url: str = ""
|
||||||
|
created_at: Optional[datetime] = None
|
||||||
|
|
||||||
|
|
||||||
|
class Workflow(BaseModel):
|
||||||
|
id: int
|
||||||
|
name: str
|
||||||
|
status: WorkflowStatus
|
||||||
|
conclusion: Optional[str] = None
|
||||||
|
url: str = ""
|
||||||
|
created_at: Optional[datetime] = None
|
||||||
|
|
||||||
|
|
||||||
|
class Config(BaseModel):
|
||||||
|
github_token: Optional[str] = None
|
||||||
|
gitlab_token: Optional[str] = None
|
||||||
|
default_repo: Optional[str] = None
|
||||||
|
refresh_interval: int = 30
|
||||||
|
theme: str = "dark"
|
||||||
Reference in New Issue
Block a user