Skip to content

Commit

Permalink
Switch models to safir.github
Browse files Browse the repository at this point in the history
Use safir.github.webhooks for webhook payloads and safir.github.models
for the GitHub REST API resources. The githubcheckrun, githubcheckout,
and githubtree models persist because they reflect internal models
(but they're related to github concepts)
  • Loading branch information
jonathansick committed Apr 18, 2023
1 parent 0a4ab3b commit 79b5fae
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 646 deletions.
343 changes: 0 additions & 343 deletions src/timessquare/domain/githubapi.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/timessquare/domain/githubcheckout.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import yaml
from gidgethub.httpx import GitHubAPI
from pydantic import BaseModel, EmailStr, Field, HttpUrl, root_validator
from safir.github.models import GitHubBlobModel, GitHubRepositoryModel

from .githubapi import GitHubBlobModel, GitHubRepositoryModel
from .page import PageParameterSchema, PersonModel


Expand Down
8 changes: 4 additions & 4 deletions src/timessquare/domain/githubcheckrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

from gidgethub.httpx import GitHubAPI
from pydantic import ValidationError

from timessquare.config import config

from .githubapi import (
from safir.github.models import (
GitHubBlobModel,
GitHubCheckRunAnnotationLevel,
GitHubCheckRunConclusion,
GitHubCheckRunModel,
GitHubCheckRunStatus,
GitHubRepositoryModel,
)

from timessquare.config import config

from .githubcheckout import (
GitHubRepositoryCheckout,
NotebookSidecarFile,
Expand Down
Loading

0 comments on commit 79b5fae

Please sign in to comment.