Page MenuHomePhabricator

pick up ticket mentions from !log lines
Closed, ResolvedPublic

Assigned To
Authored By
fgiunchedi
Aug 11 2015, 7:05 PM
Tokens
"Love" token, awarded by Eevans."Love" token, awarded by Luke081515."Love" token, awarded by RobLa-WMF."Love" token, awarded by greg."Like" token, awarded by RobH."Like" token, awarded by fgiunchedi.

Description

it'd be nice if !log lines that mention phab tickets get mentioned in the ticket itself, possibly with a bot because there isn't a complete map of nick -> phab user

Event Timeline

fgiunchedi raised the priority of this task from to Needs Triage.
fgiunchedi updated the task description. (Show Details)
fgiunchedi added a project: Phabricator.
fgiunchedi added a subscriber: fgiunchedi.

Adding Wikimedia-Logstash because that might give us part of the solution?? (all !logs now go in there)

Adding Wikimedia-Logstash because that might give us part of the solution?? (all !logs now go in there)

I have a Labs project that is tracking all !log messages to power https://tools.wmflabs.org/sal/. This is done with the Logstash irc input method and some Logstash processing rules. My tool also notices /T\d+/ to link to the mentioned Phab ticket, but it does that in PHP when a log message is displayed.

Logstash rules could be created to copy messages with /T\d+/ off to another output besides Elasticsearch. If somebody wanted to get really fancy they could theoretically write a Phabricator output for Logstash that new how to post a message to a task. Logstash is a jruby stack with plugins written in Ruby.

It would probably be easier to write a small python irc bot that did it all end to end however.

It would probably be easier to write a small python irc bot that did it all end to end however.

nvm then :)

Is !log => SAL no longer done by Stashbot? In theory, that already has code for example to output to Twitter, so adding a Phabricator output should be "easy" (IIRC @gerritbot is written in Python, so there should be a Python way to access Phabricator). The code is at http://git.wikimedia.org/summary/?r=operations/debs/adminbot.git.

The phabricator api is such a simple rest-ish api, that custom libraries are barely necessary, especially for simple tasks. Also, arcanist can be used to make arbitrary conduit requests from the command line. So pretty much any bot could be modified to "do the needful"

Aklapper triaged this task as Lowest priority.Feb 9 2016, 10:59 PM

Setting priority to lowest until someone volunteers to write / enhance such a bot and sets themselves as assignee.

I've gotten far enough in playing with this in the last few hours to lick the cookie. I'll take a stab at adding the functionality to the https://github.com/bd808/tools-stashbot (which has replaced the system I described in T108720#1529938).

SAL entry:
2016-02-12T04:56:50Z bd808 Testing task mentions (T108720)

SAL entry:
2016-02-12T04:56:50Z bd808 Testing task mentions (T108720)

It's alive!

Mentioned in SAL [2016-02-12T06:09:13Z] <bd808> Testing configurable comment format (T108720)

Mentioned in SAL [2016-02-12T16:31:40Z] <hashar> bd808 added support for saltbot to update tasks automagically!!!! T108720

Mentioned in SAL [2016-02-13T01:18:43Z] <mutante> omg testing this log feature that logs straight to tickets (T108720)