From 86693524a57a3ff2fe244d2e298cee49a1d30f7a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Mar 2024 19:14:17 +0100 Subject: [PATCH] tasks: Stop reacting to opened issue This causes a duplicate image-refresh job for auto-generated image refresh issues. These generate both an "opened" and "labelled" event at the same tme, so that we'll get two `issues-scan` webhook queue entries, and the API query in `issue-scan` will see a "bot" labeled issue for both responses. It is enough to react to the "labeled" event. --- tasks/container/webhook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/container/webhook b/tasks/container/webhook index 2224357b..4cf32aef 100755 --- a/tasks/container/webhook +++ b/tasks/container/webhook @@ -159,7 +159,7 @@ class CockpituousHandler(github_handler.GithubHandler): def handle_issues_event(self, event, request): action = request['action'] - if event == 'issues' and action not in ['opened', 'edited', 'labeled']: + if event == 'issues' and action not in ['edited', 'labeled']: logging.info("action %s unknown, skipping issues event" % action) return None