Giter Site home page Giter Site logo

ticketbot's Introduction

ticketbot -- The Django development helper IRC bot

This is the bot which replaces the following types of mentions with their URLs:

  • "#nnnnn" -- Django Trac's ticket #nnnnn
  • "!nnnn" or "PRnnnn" -- Pull request nnnn submitted to the django/django GitHub repo
  • "hhhhhhh" (7 or more chars) -- Commit with ID hhhhhhh in the django/django GitHub repo

Local setup

  1. Create a virtualenv making sure you use the same Python version as the one specified to Heroku in runtime.txt:

    $ curl https://raw.githubusercontent.com/django/ticketbot/master/runtime.txt
    python-3.7.2
    
  2. Once you've created and activated the virtualenv, install project dependencies:

    $ pip install -r requirements.txt
    

Configuration

It needs the following env vars:

  • NICKSERV_PASS -- The bot's user password
  • NICKSERV_USER -- The bot's username
  • IRC_HOST -- The IRC server hostname to connect to
  • IRC_PORT -- The IRC server port to connect to
  • CHANNELS -- A comma-separated list of channels it will auto-join to

Example, for running it locally:

$ export NICKSERV_PASS=password
$ export NICKSERV_USER=username
$ export IRC_HOST=irc.libera.chat
$ export IRC_PORT=6697
$ export CHANNELS=#django-social,#django,#django-dev,#django-sprint
$ python ticketbot.py

Tests

There are some test cases for the text matching code. You can run them with:

$ python -m unittest tests.py

ticketbot's People

Contributors

adamchainz avatar bmispelon avatar dependabot[bot] avatar felixxm avatar idan avatar markush avatar ramiro avatar timgraham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ticketbot's Issues

Deprecate and remove svn changeset syntax [12345]

SVN changeset detection currently supports two patterns: [\d+] and r[\d+], I'd like to propose removing the [\d+] syntax, because in the user-facing help channel (#django) it's far more common to use [0] etc to explain to people what is contained at an index (eg: lists, tuples, resolvermatches ...) and this happens:

<kezabelle> yeah, calling rpartition on your slug ought to do it
<kezabelle> (where [0] would yield the parent path, and [2] would be your actual slug)
<ticketbot> https://code.djangoproject.com/changeset/0 https://code.djangoproject.com/changeset/2

The references to SVN changesets are, I assume, mostly for discussion of historical changes and are likely more applicable to the developer channel. At best, in the main channel they're noise, at worst, confusing for people because a new user has interjected with unhelpful information.

Try using IRC SASL auth to circumvent Freenode Blacklist of AWS IP addresses

It seems this is the problem we are having.

See e.g. for other cases:

cnaude/PurpleIRC#141

StackStorm-Exchange/stackstorm-irc#1

We need the bot to be authenticated as its registered nick to be able to join our channels. But as Freenode doesn't allow it to even connect, it is isn't possible to even get it to lurk and receive private messages.

Freenode SASL docs: http://freenode.net/kb/answer/registration http://freenode.net/kb/answer/sasl

Unfortunately Twisted IRC doesn't have the ability to use SASL auth.

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.