Code Monkey home page Code Monkey logo

bots's Introduction

This is a little family of robots that help out with addons.mozilla.org development. They use node.js.

Dependencies

npm install irc redis underscore nomnom request

pushbot.js

pushbot subscribes to a redis channel and waits for chief to tell it about pushes. Then it parses the push logs to tell us what's going on with the push in real-time.

pushbot is configured with a separate javascript config file. Run it like this:

node pushbot.js <config.js>

where config looks like this:

options = [
    {
        /* IRC channel. */
        channel: '#amo',
        /* Bot name. */
        name: 'pushbot',
        /* Redis host:port */
        redis: 'localhost:6379',
        /* Redis pubsub channel name. */
        pubsub: 'deploy.addons',
        /* URL to the chief log directory. */
        logs: 'http://addonsadm.private.phx1.mozilla.com/chief/addons/logs/',
        /* List of nicks to notify after the deploy. */
        notify: ['krupa'],
        /* URL that shows the current revision of the site. */
        revision: 'https://addons.mozilla.org/media/git-rev.txt',
        /* URL to the github repo. */
        github: 'https://github.com/mozilla/zamboni/',
        /* Name of the site. */
        site: 'zamboni'
    }
]

Since pushbot takes an array of objects for configuration, you can watch multiple pubsub channels in the same process. Just make sure you give each pushbot a different IRC name and pubsub channel. Check out a real config for two sites in pushbot-settings.js.

During a push, you can ask pushbot for more details:

pushbot: st[at[us]]

Or you can ask about what failed:

pushbot: f[ail[ed]]

amobot.js

amobot subscribes to a redis channel and waits for freddo to tell it about automatic deploys.addons-dev.

Run it like this:

node amobot.js

You can ask amobot if -dev is up to date with the latest master:

amobot: yo

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.