Slack: Add support for Workflow Keyword notifications in Slack integration #548
+42
−1
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.
Closes: https://meta.trac.wordpress.org/ticket/8157
This is an improvement for the current version of
ticket_component_filtersbut targetting Workflow Keyword changes in the firehose.When it detects in Changes for the "new" keywords and the diff between old and new is different, it will trigger the
sendfrom\Dotorg\Slack\SendThe advantage of this trigger, is that it's constantly parsing each new comment in the firehose, not only new tickets as in
ticket_component_filters. Ideally also the rest of the triggers should be migrated to this system, because focuses and keywords can be introduced anywhere within a ticket, not only in the ticket OP.This is specially true for testing (
needs-testing) workflow keyword, that its rarely added in the first ticket, as is a intermediate keyword that its added when people actually need testing.I have not added any placeholder texts, and I'm just using the default message in
\Dotorg\Slack\Send. But maybe in the future we could set some hardcoded messages in the code, maybe as an associative array, to customize a bit the thing.