Allow Removing Certain GFM Alert Types#435
Conversation
7ba63e2 to
4de8627
Compare
4d37b9f to
9fb058c
Compare
|
@robinst Another quick PR if you have time. No rush though! |
9fb058c to
2f4175c
Compare
2f4175c to
4256dc7
Compare
| * @return {@code this} | ||
| * @see AlertsExtension#STANDARD_TYPES | ||
| */ | ||
| public Builder removeTypes(String... types) { |
There was a problem hiding this comment.
I'm wondering if it would be nicer if the API was just setAllowedTypes(Map<String, String>) instead, which would allow you to set the exact types you want (including custom ones). It would just override the whole map. With the current API in some cases you'd have to do remove+add. What do you think?
There was a problem hiding this comment.
Thanks for the suggestion! Agree that setAllowedTypes(Map<String, String>) would be better than removeTypes(String...). I think addCustomType would still be good to keep so users who just want to add 1 or 2 more types don't need to completely recreate the set, but I made two commits so you can see which you think works best:
Implements #431