Making WordPress.org

Opened 3 weeks ago

Last modified 3 weeks ago

#8157 new enhancement

Slack Command to subscribe to certain Core Workflow Keyword?

Reported by: sirlouen's profile SirLouen Owned by:
Milestone: Priority: normal
Component: Communication (Matrix, Slack, IRC) Keywords: has-patch
Cc:

Description

Is there a /github command in slack to subscribe to a Core Trac Workflow keyword?

I would like to receive in the #core-test channel a link to all the tickets that receive the needs-testing keyword both on ticket creation or ticket comments.

We already have this integration with Gutenberg and since now we are working with Core, it would be important to have the same because it's facilitating a lot to the contributors to target tickets quickly.

I've seen that certain channels like #core-performance, have this but for focuses, so I assume that there should be a way to do the same with specific workflow keywords.

Change History (7)

#1 @dd32
3 weeks ago

For general questions, please feel free to reach out to #meta instead of creating tickets. Please keep tickets to actionable items.

I would like to receive in the #core-test channel a link to all the tickets that receive the needs-testing keyword both on ticket creation or ticket comments.

We don't currently have any workflows that allow for alerting channels when a keyword is added to an existing ticket. We also don't alert channels (AFAIK) when the component is changed on a ticket: #5296

We don't currently have any workflows that alert channels based on the existence of a keyword when created, although that can be added without too much pain if that's what you're asking for.

#2 @SirLouen
3 weeks ago

Hello @dd32
I feel that some messages could get lost in the chat.

About the performance alerts based on the "performance" focus I was talking about check this:

https://i.imgur.com/wrWhIFd.png

It's not a workflow, but an app in this case. As you can see in the image, when I set the performance focus to a ticket, it automatically sent to the #core-performance channel an alert with the ticket URL.

In our case, what we want is to have alerts everytime needs-testing is added to a ticket and send a message to #core-test with the ticket URL.

Currently I have a workflow set up that sends messages like this for Gutenberg tickets

https://i.imgur.com/7XUa8U8.png

So we need something like this, but for Core. This is the actionable item.

Last edited 3 weeks ago by SirLouen (previous) (diff)

#3 @dd32
3 weeks ago

About the performance alerts based on the "performance" focus I was talking about check this:
It's not a workflow, but an app in this case

It's not an "App" It's a set of if/else statements in a PHP file. A workflow. Slack just marks anything external by a bot as an app.

You'll find most of the code here:
https://meta.trac.wordpress.org/browser/sites/trunk/common/includes/slack/trac

In our case, what we want is to have alerts everytime needs-testing is added to a ticket and send a message to #core-test with the ticket URL.

As above, we don't have a way to do this at present.

#4 @SirLouen
3 weeks ago

Thanks @dd32 I will test a bit and send a PR when I figure out how this is working

This ticket was mentioned in Slack in #core-test by juanmaguitar. View the logs.


3 weeks ago

This ticket was mentioned in PR #548 on WordPress/wordpress.org by @SirLouen.


3 weeks ago
#6

  • Keywords has-patch added

Closes: https://meta.trac.wordpress.org/ticket/8157

This is an improvement for the current version of ticket_component_filters but 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 send from \Dotorg\Slack\Send

The 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.

#7 @SirLouen
3 weeks ago

@dd32 I've added a possible patch.

Maybe if you like you could add one keyword to the ticket_keyword_filters array that is very rarely used like i18n-change to send messages to #testing-slack and better test this in a test ticket.

I've tested this in a very rudimentary way, using 3v4l.org so this may present some mistakes.

Last edited 3 weeks ago by SirLouen (previous) (diff)
Note: See TracTickets for help on using tickets.