Emmanuel Ferdman
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
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: |
|
|
|