From 995ceeb166c2756f5de0ed18a62cd5b0f033a0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 8 Aug 2024 11:46:57 +0200 Subject: [PATCH 1/2] Audi: No error then there is no fixable vulnerabilities --- github_app_geo_project/module/audit/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/github_app_geo_project/module/audit/utils.py b/github_app_geo_project/module/audit/utils.py index 81e1d9272f0..573cd1a6a54 100644 --- a/github_app_geo_project/module/audit/utils.py +++ b/github_app_geo_project/module/audit/utils.py @@ -92,7 +92,9 @@ async def snyk( if npm_audit_fix_message: assert isinstance(fix_message, module_utils.HtmlMessage) fix_message.html = f"{fix_message.html}
\n
\n{npm_audit_fix_message}" - fix_success = snyk_fix_success and npm_audit_fix_success + fix_success = ( + True if len(fixable_vulnerabilities_summary) == 0 else (snyk_fix_success and npm_audit_fix_success) + ) diff_proc = subprocess.run( # nosec # pylint: disable=subprocess-run-check ["git", "diff", "--quiet"], timeout=30 From 7121647d04f4687d6ce80141d7fdb43b8a611092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 8 Aug 2024 11:47:52 +0200 Subject: [PATCH 2/2] Changelog: Fix too many runs --- github_app_geo_project/module/standard/changelog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github_app_geo_project/module/standard/changelog.py b/github_app_geo_project/module/standard/changelog.py index ad0317f290b..6cc04eb2d1c 100644 --- a/github_app_geo_project/module/standard/changelog.py +++ b/github_app_geo_project/module/standard/changelog.py @@ -489,7 +489,8 @@ def get_actions(self, context: module.GetActionContext) -> list[module.Action[di ) and event_data.get("pull_request", {}).get("state") == "closed" and event_data.get("pull_request", {}).get("milestone") - and event_data.get("sender", {}).get("login") != context.github_application.name + "[bot]" + and event_data.get("sender", {}).get("login") + != context.github_application.integration.get_app().slug + "[bot]" ): return [module.Action(priority=module.PRIORITY_CRON, data={"type": "pull_request"})] if event_data.get("action") == "edited" and "milestone" in event_data: