Browse Source

🔨 Resolve Pydantic deprecation warnings in internal script (#13696)

Signed-off-by: Emmanuel Ferdman <[email protected]>
pull/13793/merge
Emmanuel Ferdman 2 days ago
committed by GitHub
parent
commit
7c04182724
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      scripts/label_approved.py

4
scripts/label_approved.py

@ -27,7 +27,7 @@ if settings.debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
logging.debug(f"Using config: {settings.json()}")
logging.debug(f"Using config: {settings.model_dump_json()}")
g = Github(settings.token.get_secret_value())
repo = g.get_repo(settings.github_repository)
for pr in repo.get_pulls(state="open"):
@ -48,7 +48,7 @@ for pr in repo.get_pulls(state="open"):
]
config = settings.config or default_config
for approved_label, conf in config.items():
logging.debug(f"Processing config: {conf.json()}")
logging.debug(f"Processing config: {conf.model_dump_json()}")
if conf.await_label is None or (conf.await_label in pr_label_by_name):
logging.debug(f"Processable PR: {pr.number}")
if len(approved_reviews) >= conf.number:

Loading…
Cancel
Save