Code Monkey home page Code Monkey logo

standup-irc's Introduction

standup-irc

Summary

The irc bot to go with Standup.

Install

Clone the repository:

$ git clone https://github.com/mozilla/standup-irc
$ cd standup-irc

Docker

If you have Docker setup then you can use that to run the bot:

$ make run

This will build the docker image and run the service.

Local

If you don't have Docker you can use a local nodejs environment to get the dependencies:

$ npm install .

Configure

Next you need to configure standup-irc:

$ cp config-sample.json config.json

Now edit config.json with your favorite editor.

There are comments in the config file regarding the various properties.

If you're using Docker you can also use a .env file to define environment variables that the bot can use instead of the config.json file.

Run

After you've configured it, you can run it like this:

$ npm start

Test

Run the tests, yo!

$ npm test

Or with Docker it would be:

$ make test

standup-irc's People

Contributors

dylanwh avatar freddyb avatar mozfreddyb avatar mreid-moz avatar mythmon avatar pmac avatar rehandalal avatar uberj avatar willkg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

standup-irc's Issues

bot should try harder in getting its name back

Our assumption here was that whenever it does not get its name, there's likely a stale connection from a previous instance that is lingering in the same channel. Seeing someone quit with the nickname "standups" makes the bot go back.

This does not appear to cover all cases. I just came online and noticed it had the wrong name. I started a 2nd irc session named "standups" and quit again, so our bot would see this.

It would be better to have a regular check in the bot to see if it can get its nickname back.

The IRC server we use supports the [watch module(https://wiki.inspircd.org/Modules/watch), where you add nicknames to your watch list and get notified when they appear and disappear. This could be used whenever the main nickname is not available.

Outline of patch:
On register: check own name. If name != config.name, send to server: watch +<name>
On watch-replies, take nick if it becomes available, then clear watch list (watch C)

:belew.mozilla.org 605 foo foobert2 * * 0 :is offline
:belew.mozilla.org 600 foo foobert2 freddy moz-mdovjj.dynamic.kabel-deutschland.de 1474268187 :arrived online

I'll try a pull request unless someone disagrees heavily.

I found a booger

rather james long found the booger:
rogerroger: <no message>
throws a 500

Submit multiple line messages when automatically wrapped around by the irc client.

Here is the IRC log, typed as a single message but sent as 2 messages by my IRC client:

15:02:41 <nbp> standups: some statements followed immediately by a big link:
15:02:41 <nbp> https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=mozilla-inbound&originalRevision=541bf10775c7&newProject=try&newRevision=d55684f881f6&originalSignature=80984697abf1f1ff2b058e2d9f0b351fd9d12ad9&newSignature=80984697abf1f1ff2b058e2d9f0b351fd9d12ad9&framework=1
15:02:42 <standups> Ok, submitted #46742 for https://www.standu.ps/user/nbp/

The bot only submitted the first statement, but not the link following it.

I think it would be possible to coalesce messages coming from the same person, if the messages are being received by the bot in a short consecutive manner. (less time needed than what the fastest typist can do?)

Should be able to manually set a project on a private !status message

Per https://github.com/mozilla/standup-irc/blob/master/standup-irc.js#L414, looks like it was intended that !status myproject some status here would post a status under project myproject

That would be awfully useful when trying not to spam an irc channel with frequent, small status pushes to the bot (note that this is independent of the concern with talkback fixed in #14 -- this is spam from me, not the bot).

However, the code at https://github.com/mozilla/standup-irc/blob/master/standup-irc.js#L419 only parses out a project if channel != user, which appears to exclude private queries.

I think this could probably be worked around by creating a private channel and inviting the bot in, then pushing !status messages from there, but that seems unnecessary. I'm also not sure that it wouldn't just use that channel as the project name. At the very least, it'd be error prone towards doing so if you dropped the !status command by mistake.

As it stands now, the bot will drop the first word of your private query !status message (I assume this is due to the slice(1) at https://github.com/mozilla/standup-irc/blob/master/standup-irc.js#L426) forcing you to sacrifice an unused project word to it anyway. !status test 1 2 3 in a private query gives you "1 2 3" in a status message.

In order to make this consistent, either it needs to stop dropping the first word in query !status commands or it needs to use the first word as the project. My preference would be the latter, since otherwise we have no way to set the project in a private message.

Oops, I typoed...

Actually I didn't, but I almost did, so it might be nice since we get a status no. back, to be able to do something like:

rogerroger: #oops <status no> <revised update>

I guess we'll have to update the API to handle this.

Update config.standup.host to standu.ps

Right now rogerroger is pointing people to the ugly URL and persona doesn't work there...

rogerroger Okeeday, meesa submittin status #9414 for http://standups.herokuapp.com/user/r1cky

Trying to use/talk to bot gives unhelpful error message

As a nickserv registered user, but not signed into or registered with http://standu.ps, I was trying to interact with the bot. All I was getting was:

Uh oh, something went wrong.

This should be expanded to include information about using !help and something like Have you registered on http://example.com?

broadcast issues

I just had rogerroger broadcast a message. I don't know how many channels he made it to--I definitely saw the message in some--but then he got booted from the server. He rejoined pretty quickly, so it wasn't a permanent ban.

Broadcast probably doesn't work if the bot is subscribed to > n channels.

Would it help to space out the broadcast so it does one channel per second?

rogerroger doesn't know his own name

Hey,
@arroway just found this nice explanation for rogerroger's behavior:

Sometimes, it times out or something else happens, and then the bot name is rogerroger1 (note the suffix). At some point, it will change the name back to rogerroger. But the internal state isn't updated and messages towards the bot with tab completion will be ignored. It will, however, continue to react to rogerroger1 (with the suffix).

The fix could be put somewhere in the on-quit handler, but I couldn't figure out how to make it aware of its nickname off-hand

Don't fight with the other bots.

We should be able to teach rogerroger that a denizen of irc is a bot, and should not be trifled with (nor their speech recorded as statuses).

This can probably be done by giving a black list of bots, or by trying to auto detect things that look like bots. Also, most bots don't identify themselves, so we can key off that too.

Also, we haven't run into this because standup-irc doesn't say the name of the responder, so doesn't trigger other bots.

bad error message if standup doesn't recognize you

If you're identified with nickserv and don't have a Standup account or your Standup account has the wrong IRC nick, then you tell the standup IRC bot something, you get this unhelpful message:

<standupstage> Uh oh, something went wrong.

The bot just got back a "I have no idea who that user is" message from Standup. Instead of this unhelpful message, it should say something like:

<standupstage> The Standup instance at URL doesn't know about that user. See URL for help.

Then at URL, we have something like:

If you're new to Standup, you'll need to create a user account at the website first. If you're not new to Standup, log in, go to your profile and make sure your IRC nick there matches the one you're using.

Probably with more details and steps and such.

Bug titles should be fetched automatically

When entering a status referencing a bug number, it would be very convenient to fetch and display the bug title automatically; eg. if I'm entering:

started working on bug 42

The status message could be updated to something like:

started working on bug 42 (Bug 42 title goes here)

rewrite in python

This part of the Standup project has languished and it's got a bunch of problems that should get fixed, but haven't been.

For me, there are two big reasons I've done virtually nothing here. First is that I've been spending my time on Standup and second is that this is a node.js project and I just don't know enough node.js to swoop in and get anything done without spending a lot of time.

On top of that, this project doesn't have many tests. Did we break things when fixing stuff? We have no idea. This project doesn't have much in the way of documentation. How does it work? What's supported? There's a README, but it's missing a bunch of stuff like how to talk to the bot.

There isn't a lot of functionality here. Standup is written in Python and has more project activity. I claim we'll get a lot of traction out of rewriting this project in Python and reusing a bunch of the infrastructure we have for Standup.

This issue covers a rewrite.

joining channels issues

I'm in the process of nixing rogerroger for the standups irc bot. In doing that, I copied down the list of channels that rogerroger was in to the standups db then restarted the standups bot. standups would join 26 channels, then hang and restart 4 minutes later. This continued for some time until either an irc op fixed the issue on their end or something else happened or something.

Anyhow, I suspect there's some throttling for joining a bunch of channels or something going on. It'd be good to know what it is and how we can adjust standup-irc to be a better citizen.

Some thoughts:

Can we join a bunch of channels at the same time in one call or do we have to do it one at a time?

Is this a problem just with joining a bunch of channels it wasn't previously in? Like maybe you can only join 20 new channels at a time?

Would it help to space out joining channels so at startup it joins one channel per second or something like that?

automatically submit status reports for github activity

@groovecoder said:

in #mdndev we have a lot of:

12:02:21 - github: [kuma] groovecoder pushed 2 new commits to master: https://github.com/mozilla/kuma/compare/affa7ce93d20...d8609f7d32dd
12:02:21 - github: kuma/master dceb729 Les Orchard: fix bug 821988: Use wiki bleach filter on revision content
12:02:21 - github: kuma/master d8609f7 luke crouch: Merge pull request #790 from lmorchard/821988-revision-content-xss...

would be great if rogerroger could pick up 'Les Orchard: fix bug 821988' and 'luke crouch: merge pull request #790" and make them "fixed bug 821988" and "merged pull 790" status reports?

standups bot is non-responsive this morning

Trying to talk to standups in the last twenty or so minutes and I'm getting no reply. The updates also aren't making it to the website. Tried on irc.mozilla.org #fce and #perf

Not sure what's up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.