Making WordPress.org

Opened 10 months ago

Closed 2 weeks ago

Last modified 46 hours ago

#8157 closed enhancement (fixed)

Slack Command to subscribe to certain Core Workflow Keyword?

Reported by: SirLouen Owned by: obenland
Priority: normal Milestone:
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 (12)

#1 @dd32
10 months 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
10 months 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 10 months ago by SirLouen (previous) (diff)

#3 @dd32
10 months 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
10 months 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.


10 months ago

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


10 months 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
10 months 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 10 months ago by SirLouen (previous) (diff)

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


7 months ago

#9 @obenland
2 weeks ago

  • Owner set to obenland
  • Resolution → fixed
  • Status new → closed

In 15418:

Slack: Add support for Workflow Keyword notifications in Slack integration

Props sirlouen, obenland.
Closes ​https://github.com/WordPress/wordpress.org/pull/548.
Fixes #8157.

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


2 weeks ago

#11 @SirLouen
2 weeks ago

Thanks @obenland, this is a valuable asset for the Test Team I believe.

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


46 hours ago

Note: See TracTickets for help on using tickets.