WordPress.org

Making WordPress.org

Opened 2 years ago

Last modified 8 months ago

#2555 new defect

Slack: Update Trac bot to support threads

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: low
Component: Slack & IRC Keywords: needs-patch
Cc:

Description

If someone shares some tickets in a Slack thread, the Trac bot posts ticket links to the main channel, out of context.

The bot should be updated to post these links to the corresponding thread:
https://api.slack.com/docs/message-threading#best_practices

Attachments (1)

meta-2555.png (188.3 KB) - added by SergeyBiryukov 2 years ago.

Download all attachments as: .zip

Change History (14)

#1 @ocean90
2 years ago

  • Keywords needs-patch added

This ticket was mentioned in Slack in #core by sergey. View the logs.


2 years ago

#3 @netweb
2 years ago

#2892 was marked as a duplicate.

This ticket was mentioned in Slack in #core-customize by pento. View the logs.


2 years ago

This ticket was mentioned in Slack in #forums by sergey. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by sergey. View the logs.


2 years ago

#7 @ocean90
2 years ago

  • Priority changed from normal to low

The current bot is triggered by an outgoing webhook which doesn't provide any infos about threads. To support threads we have to write a new app using the new APIs by Slack.

This ticket was mentioned in Slack in #core-customize by jeffpaul. View the logs.


23 months ago

#9 follow-up: @jbpaul17
23 months ago

For those interested in trying to get resolution on this, where is the code for Tracbot to crack open and try to patch/issue a PR?

#10 in reply to: ↑ 9 @SergeyBiryukov
23 months ago

Replying to jbpaul17:

where is the code for Tracbot to crack open and try to patch/issue a PR?

The current code is here: https://meta.trac.wordpress.org/browser/sites/trunk/common/includes/slack/trac

#11 @pento
23 months ago

According to the docs (or, the sample data in the docs, at least), the outgoing webhook provides the thread_ts parameter.

I've just been doing some testing, and it looks like the incoming webhook API doesn't obey the thread_ts parameter. I've pinged Slack support for confirmation.

#12 @pento
23 months ago

Update from Slack: they're not going to work on it in the near future.

Soooo.... the Slack API code will need to be rewritten. :-)

#13 @RMarks
8 months ago

I took a look how this might work. From what I have read and tested in another Slack workspace I have access, the new Slack incoming webhooks require a webhook URL to be setup per channel the app should be allowed to post. Per the new docs:

You cannot override the default channel (chosen by the user who installed your app), username, or icon when you're using Incoming Webhooks to post messages. Instead, these values will always inherit from the associated Slack app configuration.

Due to this limitation, for the various use cases I can see in Slack, there would need to be a different Slack app for each different named bot that would post:

  • WordPress commit
  • WordPress Trac
  • WordPress.org Meta Trac
  • etc.
Note: See TracTickets for help on using tickets.