YappyBots / YappyGitLab

A GitLab monitor bot for Discord
https://www.yappybots.tk/docs/gitlab
MIT License
51 stars 12 forks source link

Add ability to disable Note event by noteable_type #51

Open mutezero opened 5 years ago

mutezero commented 5 years ago

Currently, only all comments can be disabled. Adding noteable_type field check around /lib/Web.js#L52 should do the trick.

Use case: Having only issues and their comments in channel A (for the public), but rest of repository events in channel B (for developers and project managers).

mutezero commented 3 years ago

I've decided to investigate the issue once again, and it seems to still being a problem here https://github.com/YappyBots/YappyGitLab/blob/95d65fcabb53417435cc62054b7eed2a9451ce2a/lib/Web.js#L65-L66 https://github.com/YappyBots/YappyGitLab/blob/95d65fcabb53417435cc62054b7eed2a9451ce2a/lib/Web.js#L110 The issue is that it only credits action field, but not noteable_type, unlike the event handler (Discord message picker/formatter) https://github.com/YappyBots/YappyGitLab/blob/95d65fcabb53417435cc62054b7eed2a9451ce2a/lib/Gitlab/EventHandler.js#L42-L47