mirror of
https://github.com/Kludex/awesome-fastapi-projects.git
synced 2025-01-18 15:27:03 +00:00
16 lines
503 B
Python
16 lines
503 B
Python
from github.Repository import Repository
|
|
|
|
from fastapi_projects.database import SessionManager
|
|
from fastapi_projects.models import Project
|
|
|
|
|
|
def skip_repository(repository: Repository) -> bool:
|
|
if repository.fork:
|
|
return True
|
|
with SessionManager() as session:
|
|
name = repository.full_name
|
|
project = session.query(Project).filter(Project.name == name).first()
|
|
if project is None or project.pushed_at < repository.pushed_at:
|
|
return False
|
|
return True
|