Skip to content

Commit

Permalink
tasks: Stop reacting to opened issue
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinpitt authored and allisonkarlitskaya committed Mar 13, 2024
1 parent 40c6a90 commit 8669352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/container/webhook
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8669352

Please sign in to comment.