Commit Graph

1154 Commits

Author SHA1 Message Date
Brian S. Stephan fca69b1994 gitlab bot: add a class to track review scanning
the code to scan all merge request notes for reviews is getting messy,
going to try moving most of the state into a class. still unsure this is
final
2016-06-24 14:32:59 -05:00
Brian S. Stephan 1a428e7d29 gitlab bot: make project_id unique=True 2016-06-24 13:54:37 -05:00
Brian S. Stephan e846502b48 gitlab bot: start refactoring code review methods
the code review logic to this point is kind of convoluted, and still is
for the moment, but this moves some of the stuff into a more coherent
spot in the expectation of reuse. most of the refactoring is still to
come
2016-06-24 13:50:09 -05:00
Brian S. Stephan 8f7b477fb8 start of gitlab code review/merge bot
the intent of this thing is to scan configured projects' merge requests,
and automatically assign them to designated code reviewers. if someone
says "LGTM" in the merge request thread, that counts as a review and the
bot either selects another reviewer or assigns the thing to a designated
merge approver for the final approval and merge

this is most of the way there, but not done yet. things still to do:

1) more strings than "LGTM", but we should be careful to avoid things
   that someone might actually say
2) i'm trying to avoid it but i probably need to track the 2 of 2
   reviewer message separate from the message assigning the merge
   request to an approver. it's plausible that a reviewer is also an
   approver, and if the last reviewer is a candidate approver, the
   script does nothing, but we probably want it to still log the 2 of 2
   part. i could track the "nagging" for 2 of 2 messages, to avoid
   the bot repeating itself, but that seems unfortunately annoying
2016-06-23 23:49:38 -05:00
Brian S. Stephan 8b36f2c56b Merge branch 'karma-graphs' into 'master'
Show list of keys in the karma index

Nothing too crazy here, just lists the karma keys on the Django karma index page. Might be really slow, haven't tried it on a huge dataset yet.

See merge request !8
2016-06-23 14:58:35 -05:00
Brian S. Stephan 18ff814bc8 karma: add a pagination default of 10 2016-05-13 22:41:13 -05:00
Brian S. Stephan 46ffe7a72d karma: remove the rank from the index table
it's kind of redundant anyway, since we include the score
2016-05-13 22:30:59 -05:00
Brian S. Stephan 26f0604922 karma: add django rest framework
i tried to use this for datatables, but it was taking too long to get a
response, so i'm abandoning this for the moment, but the support's there
for the future
2016-05-13 22:19:38 -05:00
Brian S. Stephan 4809247632 karma: display all karma keys in index page
this kind of sucks from a performance standpoint, i'd like to make it
better
2016-05-13 21:55:54 -05:00
Brian S. Stephan b82e5309e1 drop the artificial data point at 0,0
kinda screwing up some graphs
2016-03-31 19:19:35 -05:00
Brian S. Stephan c364578e5d lowercase the key in karma graph URL 2016-03-31 16:47:17 -05:00
Brian S. Stephan e5263d0019 show karma graph with date-based X range
this is way more interesting of a graph than delta-based, which just
ends up being a linear slope. dunno what i was thinking yesterday
2016-03-31 16:36:10 -05:00
Brian S. Stephan dab41fa7d3 pad the bottom of pages' content 2016-03-30 18:06:44 -05:00
Brian S. Stephan 50f2b12c18 only build history once in karma graph, do history 2016-03-30 18:04:19 -05:00
Brian S. Stephan 08da8ea9f3 tweak karma graph output for many data points
if there's a ton of data points, the graph starts looking real gross,
so do a couple things to make the display of that a bit simpler so
there's less noise and distracting lines and whatnot
2016-03-30 17:57:00 -05:00
Brian S. Stephan 3e9302c89c don't display dots on the karma graph 2016-03-30 17:26:59 -05:00
Brian S. Stephan 03047c458f add an initial point to the karma key graph 2016-03-30 17:20:33 -05:00
Brian S. Stephan 28002db80b tweak the karma graph colors a bit 2016-03-30 17:19:06 -05:00
Brian S. Stephan 82c1b1babd Merge branch 'karma-graphs' into 'master'
Create karma graph report page



See merge request !7
2016-03-30 17:12:04 -05:00
Brian S. Stephan 88c130c7a3 Merge branch 'bootstrap' into 'master'
Add initial bootstrap3 support



See merge request !6
2016-03-30 17:10:24 -05:00
Brian S. Stephan 6fad9202ca add karma graphs view to the django site
pretty simplistic for the moment, it will become more robust later (TM)
2016-03-30 17:08:01 -05:00
Brian S. Stephan 03b90fe50a add KarmaKey.history()
calculates the value of the score at every point in the score's history.
might be slow, unsure yet
2016-03-30 17:06:12 -05:00
Brian S. Stephan 33bf61712e more bootstrap config stuff
these will be necessary for other jquery things in a moment
2016-03-30 17:05:26 -05:00
Brian S. Stephan 85f9ae7d4d convert the very basic UI we had to bootstrap 2016-03-30 16:00:49 -05:00
Brian S. Stephan 5225d2bd6b add django-registration-redux and use some of it
for the moment this is for the password change url used in the auth
dropdown, and a better login page, but this might become other stuff
eventually too. the signup page exists and is linked to, even if i don't
have a great reason for this to exist

bunch of templates added now to support the intentional and
unintentional stuff
2016-03-30 15:36:56 -05:00
Brian S. Stephan e52f4c915f prospector - 'log' okay name, analyze docstrings 2016-03-02 21:43:21 -06:00
Brian S. Stephan 91c4a44526 .gitlab-ci.yml: don't fail on prospector messages 2016-03-02 21:01:43 -06:00
Brian S. Stephan 7386efa2ee messing around with a gitlab CI config 2016-03-02 20:32:22 -06:00
Brian S. Stephan 2cee918fd9 twitter: reverse the mentions list before printing 2016-01-26 23:29:26 -06:00
Brian S. Stephan 21941b3392 Merge branch 'twitterbot' into 'master'
Twitter: poll the bot's mentions feed, print to channel

This uses the Twitter client's method for checking the mentions timeline
in a new thread (which can be started/stopped via IRC) to print mentions
to a specified IRC channel.

See merge request !5
2016-01-26 23:22:13 -06:00
Brian S. Stephan 9d5b9e070b twitter: start/stop mention poll thread via irc
includes a migration for a new permission for this, naturally. with
this, the poll thread can be started and actually do stuff
2016-01-26 23:14:42 -06:00
Brian S. Stephan 3b78e9b894 twitter: method for polling mentions timeline
not stitched together in this commit, so it'll work but it won't be
started
2016-01-26 00:39:51 -06:00
Brian S. Stephan 6cbf5f3d96 twitter: pull the tweet reply method into two
_return_tweet_or_retweet_text used to both determine the proper tweet
text and bot.reply() with it to the provided event. if we're not
reacting to an irc event, this obviously won't work, so this pulls the
method into two things so that we can use the string formatting code
without necessary needing an event
2016-01-26 00:08:46 -06:00
Brian S. Stephan e8e42cc580 twitter: replace since_id with mentions_since_id
we'll want to treat the since_ids for mentions and (theoretical)
timelines differently, i think, so might as well just set up the split
out field now
2016-01-24 18:46:06 -06:00
Brian S. Stephan 352ce81bc9 twitter: add field for mentions output channel
this removes an old, general field, which was once used for multiple
things, but we should break apart its functional usage and also just
refer to our IrcChannel object anyway

this is the easy half of issue #3
2016-01-24 17:50:46 -06:00
Brian S. Stephan e25b3aca9d twitter: don't append colon to nick when replying
just a style thing, nbd
2016-01-17 12:37:23 -06:00
Brian S. Stephan 3718db5086 Merge branch 'py3' into 'master'
Py3 - Format exceptions properly

Exceptions need to be explicitly cast as strings before being fed to
format() now

See merge request !4
2016-01-17 12:13:50 -06:00
Brian S. Stephan 57588afbe6 dispatch: wrap exceptions in str() before format() 2016-01-17 12:11:00 -06:00
Brian S. Stephan b09c20e910 twitter: wrap exceptions in str() before format()
this might also do something about #1, considering i'm also just doing
blanket except Exception:s now. fingers crossed
2016-01-17 12:04:34 -06:00
Brian S. Stephan 124cf0bdb0 removing BUGS file
i couldn't confirm the only thing in it, and gitlab seems like a way
better idea anyway, now that i'm using it
2016-01-17 11:51:19 -06:00
Brian S. Stephan 702a2de4c6 Merge branch 'py3' into 'master'
Py3 - Remove a couple unnecessary UTF8 encodes



See merge request !3
2016-01-17 11:44:27 -06:00
Brian S. Stephan 7a1c024d69 dispatch: write message to file properly in py3 2016-01-17 11:39:43 -06:00
Brian S. Stephan 007f9bdbc7 twitter: don't re-encode replyee name
this appears to have been whan was causing replying via twitter to fail.
let's test something while we're here:

fixes #2
2016-01-17 11:36:10 -06:00
Brian S. Stephan 164f2c61bf Merge branch 'better-plugin-support' into 'master'
Better plugin (un)loading --- more logging, !reload plugin with option
of reloading entire package

In addition to a variety of logging and internal changes, this
also adds a !reload [plugin] command, which, where 'plugin' is
'package.ircplugin', just does a simple unload/load on the
plugin, but where 'plugin' is 'package.', reloads all modules
in the specified package (assuming it is still a plugin's
package), which allows for making more code changes and applying
them without having to restart the bot.

Like all things this internal to the bot, this probably needs
the tires kicked a bit more, but initial testing has succeeded.

See merge request !2
2016-01-17 11:12:32 -06:00
Brian S. Stephan 6fe6797281 ircbot: implement !reload for plugins
in addition to being a convenient unload plugin, load plugin, this also
uses importlib.reload() to kick the interpreter to reload changed code
inside the plugin's package, if the user requests to reload the entire
package. this seems safe so far

(famous last words)
2016-01-17 10:56:39 -06:00
Brian S. Stephan 0ba889bf75 ircbot: _unload_plugin doesn't need connection 2016-01-17 10:52:25 -06:00
Brian S. Stephan 97c18a2459 ircbot: provide feedback option to _plugin_unload 2016-01-17 09:49:55 -06:00
Brian S. Stephan 10071f9094 ircbot: add load/unload plugin documentation 2016-01-17 09:49:30 -06:00
Brian S. Stephan 676f479d52 ircbot: add some debug logging in plugin (un)load 2016-01-17 09:21:29 -06:00
Brian S. Stephan 4c949ee6f3 ircbot: don't unload just one plugin of path
if we somehow got multiple plugins of the same path loaded, unload them
all when unloading, not just the first one we find
2016-01-17 09:20:06 -06:00