gitlab4j / gitlab4j-api

GitLab4J API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories via the GitLab REST API
MIT License
1.06k stars 457 forks source link

Support for Confidential Note Webhook #896

Open MiguelAngelLV opened 1 year ago

MiguelAngelLV commented 1 year ago

The webhook listener don't support Confidential Note:

org.gitlab4j.api.GitLabApiException: Unsupported X-Gitlab-Event, event Name=Confidential Note Hook
jmini commented 1 year ago

The confidential note hook is barely documented on: https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-events

It seems that this would be an event similar to NoteEvent with a different X_GITLAB_EVENT value.

Maybe instead of duplicating NoteEvent as ConfidentialNoteEvent a common class between those two can be created. --> AbstractNoteEvent

You can open a PR with those changes.