From bf5a00b7bddebd44928bf492a556d42949c171f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 6 Dec 2024 13:28:24 +0100 Subject: [PATCH] Fix for pull request with no milestone --- github_app_geo_project/module/standard/changelog.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/github_app_geo_project/module/standard/changelog.py b/github_app_geo_project/module/standard/changelog.py index 5b06e2ec04..dcfa88854d 100644 --- a/github_app_geo_project/module/standard/changelog.py +++ b/github_app_geo_project/module/standard/changelog.py @@ -512,7 +512,11 @@ def get_actions(self, context: module.GetActionContext) -> list[module.Action[di milestone_version = event_data.get("milestone", {}).get("title") if milestone_version is not None: versions.add(milestone_version) - pull_request_version = event_data.get("pull_request", {}).get("milestone", {}).get("title") + pull_request_version = ( + event_data["pull_request"]["milestone"].get("title") + if event_data.get("pull_request", {}).get("milestone") + else None + ) if pull_request_version is not None: versions.add(pull_request_version) return [