From 461d8b0aaff664dca7d0dc44c30e6d20bb2d6661 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Fri, 24 Jan 2025 15:42:33 +0200 Subject: ci-github: Handle (ignore) Marketplace and installation events --- mod/mod-ci-github.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'mod/mod-ci-github.cxx') diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index c2596c7..6cf3b80 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -564,6 +564,31 @@ namespace brep // return handle_branch_push (move (ps), warning_success); } + // Ignore marketplace_purchase events (sent by the GitHub Marketplace) by + // sending a 200 response with empty body. We offer a free plan only and + // do not support user accounts so there is nothing to be done. + // + else if (event == "marketplace_purchase") + { + return true; + } + // Ignore GitHub App installation events by sending a 200 response with + // empty body. These are triggered when a user installs a GitHub App in a + // repository or organization. + // + else if (event == "installation") + { + return true; + } + // Ignore ping events by sending a 200 response with empty body. This + // event occurs when you create a new webhook. The ping event is a + // confirmation from GitHub that you configured the webhook correctly. One + // of its triggers is listing an App on the GitHub Marketplace. + // + else if (event == "ping") + { + return true; + } else { // Log to investigate. -- cgit v1.1