def process_github_pull_request_review(pullrequest: dict, review: dict) -> None: """Will handle with care.""" if review["state"] == "commented": notify_channel( "pull_request_review", f"{google_chat_username_by_github_user(review['user']['login'])} submitted a review:comment" f" for Pull Request '{pullrequest['title']}'", pullrequest["html_url"], ) elif review["state"] == "approved": add_labels(pullrequest["_links"]["issue"]["href"], ["approved"])
def process_github_pull_request_review_submitted(pullrequest: dict, review: dict) -> None: """Will handle with care.""" if review["state"].startswith("approved"): _LOGGER.info("Set label 'approved' for {pullrequest['html_url']}") add_labels(pullrequest["_links"]["issue"]["href"], ["approved"])