Skip to content

Feature Request: Add Support for Gerrit Webhooks #4350

@RitamM16

Description

@RitamM16

Is your feature request related to a problem?

Fleet currently supports webhook integrations for major providers such as GitHub and GitLab. Much of the required logic for adding additional providers already exists. To support Gerrit, we primarily need to introduce the Gerrit webhook event schema and implement the corresponding parser.

Solution you'd like

Since github.com/go-playground/webhooks/ does not include a Gerrit implementation, I propose introducing a new package under pks/webhook to house the Gerrit webhook types and parser. This aligns with the structure used for other providers and avoids introducing dependencies on unmaintained external modules.

The required steps would include:

  1. Implementing the Gerrit webhook payload structs and parser logic
  2. Adding Gerrit as a new case in webhook.go within the existing parseWebhook function

Caveat

Gerrit webhook requests do not include unique HTTP headers that can be used for reliable provider detection. Because of this, the Gerrit case will need to be added at the end of the provider-detection switch block in parseWebhook, ensuring it is only evaluated after all other providers have been ruled out.

Alternatives you've considered

No response

Anything else?

No response

Metadata

Metadata

Assignees

Projects

Status

🆕 New

Relationships

None yet

Development

No branches or pull requests

Issue actions