Add support for notification class overrides #1518
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Back in July I raised issue #1475, because my team wanted to be able to customise the notification that was sent when a long wait occurs. I was told to attempt a PR and this is certainly... an attempt. Please be nice, this is my first ever PR into an open source project.
Usage
Considerations
LongWaitDetected
), but this implementation is designed with future extensibility in mind. Using a map provides flexibility for additional notifications if they are introduced, instead of being limited to a single notification override.LongWaitDetected::toNotification()
to determine whether to construct a custom notification. I considered alternative, more abstract approaches, but they would involve more significant changes to the codebase.I am quite expecting this PR to be declined, but if that is so, I would greatly appreciate any feedback - as mentioned above this is my first contribution to an open source project so your feedback/advice is genuinely valuable to me. Thanks.