Commit Graph

349 Commits

Author SHA1 Message Date
Tim Abbott 3be748ad25 [manual] Bump API version to 0.1.4.
To incorporate the site parsing fix from a couple weeks ago.

Before deploying this to prod we need to run build-api-tarball and
deploy the code to humbughq.com as for usual API releases.

(imported from commit f6711f5cc07d174c30866029032a595ecee785a3)
2013-03-05 10:17:57 -05:00
Jessica McKellar ad71168f77 Add an example RSS bot that runs out of cron.
(imported from commit 81d7e010f6316dfbe0ce7b645a7b61dde2881483)
2013-02-22 17:00:42 -05:00
Jessica McKellar 7202c50271 Install the demos directory in /usr/local/share/ as well.
(imported from commit 7516e5318f9e30544f53703ead4bca60f2dd7828)
2013-02-22 17:00:42 -05:00
Keegan McAllister 56d183ea06 Remove lurk mode from web client and API examples
See #796.

(imported from commit e238ce571c3f30d8312b630df7048ad1d9cad6d2)
2013-02-21 15:11:10 -05:00
Keegan McAllister 75704ad1e8 Consistently use #!/usr/bin/env python
At Ksplice we used /usr/bin/python because we shipped dependencies as Debian /
Red Hat packages, which would be installed against the system Python.  We were
also very careful to use only Python 2.3 features so that even old system
Python would still work.

None of that is true at Humbug.  We expect users to install dependencies
themselves, so it's more likely that the Python in $PATH is correct.  On OS X
in particular, it's common to have five broken Python installs and there's no
expectation that /usr/bin/python is the right one.

The files which aren't marked executable are not interesting to run as scripts,
so we just remove the line there.  (In general it's common to have libraries
that can also be executed, to run test cases or whatever, but that's not the
case here.)

(imported from commit 437d4aee2c6e66601ad3334eefd50749cce2eca6)
2013-02-20 16:02:30 -05:00
Keegan McAllister 8f5031687c post-receive: Send a notification to @everyone on non-fastforward
(imported from commit 8fc232dbef4b9b87f30f0b68c6407c43fd8553ba)
2013-02-19 17:39:55 -05:00
Tim Abbott 3a2ece7496 api: Fix reading in default value for api/site.
(imported from commit 7e698015599aee4f7b9176381b2ef2d29f3836af)
2013-02-19 15:40:18 -05:00
Tim Abbott c73ec65a2f git integration: Fix handling of new/removed branches.
(imported from commit f87ba78dbc292a05d82aedc74a90de6cbefee3e2)
2013-02-19 15:40:18 -05:00
Tim Abbott 346d16c034 api: Fix need to manually update list of integrations.
(imported from commit 6842230f939483d32acb023ad38c53cb627df149)
2013-02-19 10:17:06 -05:00
Tim Abbott 8c2c65f718 [manual]: API: bump version to 0.1.3.
We need to run build-api-tarball and release it on prod when pushing
this commit to prod.

(imported from commit 09e86500d2d208b1972c87444b4c2d56faafc8e6)
2013-02-19 09:17:08 -05:00
Tim Abbott 4caafd66ce Rewrite git hook for distribution and document it.
(imported from commit c3238bc5b5e29727cddb43bc55ab418326226acd)
2013-02-19 09:17:06 -05:00
Tim Abbott f0be25ec9d [manual] Bump API version to 0.1.2.
Before pushing this to prod, we need to build the 0.1.2 API tarball
and deploy it to the appropriate place on our servers.

(imported from commit ec1a07b3cc2a3e360dac32823ff7cd9de9de1da2)
2013-02-14 17:50:00 -05:00
Tim Abbott 6e1842d5fa trac: Add owner to list of fields that notify by default.
(imported from commit 48084ff341e4cce6164bfbfde9105768303d185c)
2013-02-14 17:50:00 -05:00
Tim Abbott 63827c2301 Make the Nagios integration configurable, available, and documented.
(imported from commit 1208fc08ed366a892763c3b29b9aeafa90b29981)
2013-02-14 17:50:00 -05:00
Tim Abbott 61369c87ec Move trac integration to a subdirectory.
(imported from commit fea539e275a5c81d9fde7f66ef8396d77f8d8b6d)
2013-02-14 17:50:00 -05:00
Tim Abbott 4ed2ffb4ce api: Fix installation of example and integrations.
Previously we were installing data files to e.g. /usr/local/example
and /usr/local/integrations, which is really not OK.

(imported from commit 0efb50412f93efabfe55443d5cac57a8ebb9fe06)
2013-02-14 17:50:00 -05:00
Tim Abbott 2b12dbae9c api: Make site settable via configuration files.
This works much better for working with staging, since rather than
needing to tell each individual tool that you're using staging, you
just specify that along with your API (which at the moment implies
whether you should be using staging or prod).

(imported from commit c1de8e72c24f35ef2160bce5339a5f03c6e1da95)
2013-02-14 17:50:00 -05:00
Tim Abbott c213e3f147 humbug_trac: Make sure we import humbug_trac_config from cwd.
It doesn't matter for this script, but I worry the code will be
copy-pasted into other new plugins.

(imported from commit 0fe5280af5aa05a7efc3d146f1570f9a72c62027)
2013-02-14 17:50:00 -05:00
Tim Abbott bf52fcff8a humbug_trac: Make notifications for comments configurable.
(imported from commit 8eeea4051194d0038b039befd9b9a0ee4099a30c)
2013-02-14 11:14:48 -05:00
Tim Abbott 818bf4d6e9 humbug_trac: Make which field changes cause notifications customizable.
(imported from commit 91b138a0eaf3c3773752ae3a4c4599bd5c095497)
2013-02-13 16:30:30 -05:00
Tim Abbott be57fa8a76 Split out Trac plugin configuration (and de-duplicate the plugin).
(imported from commit aa3cd2c5a376315a463bf564ba57d751e36431d6)
2013-02-13 16:30:30 -05:00
Tim Abbott bedf1dd563 api: Make call_on_each_message restart if 'last' is too old.
This should fix the symptoms of the problem we've been having where a
few API clients using the MIT Zephyr mirroring system sometimes seem
to end up with a too-old value of last.

(imported from commit 9f2426fa6a7e8365e8d3443bfd2cce3238cc9510)
2013-02-13 08:14:09 -05:00
Zev Benjamin ae97854d17 Bump API version number for addition of integrations/ directory
(imported from commit c5990ef963b5e7b7919fdef9f461a75e82015113)
2013-02-12 16:11:20 -05:00
Jessica McKellar 73331f1e18 api: Add a list-members example script for the /get_members query.
(imported from commit 2fc213b746eb032b98d86f933ce69e7cbe9822d1)
2013-02-11 13:45:47 -05:00
Jessica McKellar 8bbb88fc29 api: Add get_members to the Python bindings.
(imported from commit 446453e0cd355f37876a2233bbfa024a96f3a6a8)
2013-02-11 13:45:46 -05:00
Waseem Daher 2660db7e18 api: Move integrations into their own subdirectory.
(imported from commit e1a64fbbc64e64e7a2c2fdda4cc9bc77ff3bc852)
2013-02-07 14:15:44 -05:00
Waseem Daher 8f573fac4c Simplify the Trac integration plugin options slightly.
(imported from commit 4588d70f4e7664a9ba85be7003e17d4e8f55a333)
2013-02-06 17:37:44 -05:00
Zev Benjamin b0b304e58b Add a copy of our Trac integration (with example constants) to the API examples
(imported from commit 4e7bfaf92842ae0bb24c28ae1187d83ca5c44b0e)
2013-02-06 11:45:43 -05:00
Luke Faraone 71e98baad4 We no longer require requests<<1
(imported from commit 2ddfca4f969a4f0cba3851c8123b1a3427f63509)
2013-02-05 16:35:45 -05:00
Luke Faraone 61d8183a71 Be more explicit as to where .humbugrc goes
(imported from commit 3e229d61ebfef64e29ca45cc57eca04ec207ae86)
2013-02-05 16:35:45 -05:00
Luke Faraone fc7b6e9fb0 Invert check for .json() vs .json in requests.
dd74cadb incorrectly used .json when it should have used .json(), and
vice-versa.

(imported from commit 2a1d0bbaece77e6765c430ddf3e8de5d987194ae)
2013-02-05 16:34:16 -05:00
Tim Abbott a5f2bec873 api: Fix running with requests 1.0.x.
I would prefer to be testing the attribute itself rather than the
version, but it's not easy to access without an actual request object,
and I'd prefer to compute this once-and-for-all on startup, rather
than on each request, since the latter just seems fragile.

(imported from commit dd74cadb1b2359faeb3e1b482faeee4003dfad77)
2013-02-05 16:08:46 -05:00
Jessica McKellar d30c8b857e Only include send_message-related examples in API release.
(imported from commit 058a121b4b3c6b2829396c3c7a1007656a9e09da)
2013-02-05 14:09:29 -05:00
Luke Faraone 8e0ed8eb07 Update README to document new layout and installation instructions.
(imported from commit ba4d8c4db31ef572b53f49b6792b926236bea553)
2013-02-01 15:52:28 -05:00
Luke Faraone 0e4f1b6d24 Basic setup.py script for API
Refer to the API version via an import.

(imported from commit ef28f4edc0d519b4c6a49ef414279685a3d38202)
2013-02-01 15:52:28 -05:00
Luke Faraone 57e0d37249 Move files around in the API.
Bots are not part of what we distribute, so put them in the repo root.

We also updated some of the bots to use relative path names.

(imported from commit 0471d863450712fd0cdb651f39f32e9041df52ba)
2013-02-01 15:52:28 -05:00
Leo Franchi 6e9b8d895c Add munin plugin for send-receive timing
(imported from commit e2ae0775379ce59ab43213e68ade4d3f88b578e6)
2013-01-31 13:02:57 -05:00
Leo Franchi 6e3e6f00bd Add a proof of concept polling twitter bot
(imported from commit ededca33bc74404075de343aad1ec3358f07fe92)
2013-01-31 13:02:29 -05:00
Leo Franchi 6a755c2126 Convert to []-style list comprehensions to quiet pyflakes
(imported from commit d81ec98552846d8af71394c7c530aadc53f77127)
2013-01-30 15:24:49 -05:00
Luke Faraone 6b9f688ba4 Require requests version to be >= 0.12.1.
My previous commit (fbdc092029bbafea716e27fbb99fec58a6f24392)
incorrectly specified that you must have a version of python-requests
greater than 0.12.1, when it should be a >= relation since 0.12.1 is
sufficient.

(imported from commit 9f716af6dfe0ce17d982fc22d507f144e9543bec)
2013-01-17 13:54:41 -05:00
Luke Faraone ca8c759bef Document more specific dependency for humbug API on python-requests
(imported from commit fbdc092029bbafea716e27fbb99fec58a6f24392)
2013-01-16 16:57:38 -05:00
Luke Faraone 4463f267b3 Move the API into a subdirectory for ease of imports.
Previously, if users of our code put the API folder in their pyshared
they would have to import it as "humbug.humbug". By moving Humbug's API
into a directory named "humbug" and moving the API into __init__, you
can just "import humbug".

(imported from commit 1d2654ae57f8ecbbfe76559de267ec4889708ee8)
2013-01-16 16:55:22 -05:00
Luke Faraone e2429199ad Switch humbug-send to use "humbug" as the module.
The old-style api.humbug is deprecated, so we rewrite the path for things
to work correctly.

(imported from commit 360282b70fab1ad9d9d517157fc4fe06f9acd6a2)
2013-01-16 16:55:22 -05:00
Keegan McAllister 6ddbcf4799 gcal-bot: Handle all-day events
(imported from commit 7395f2cdd2003b24ce59a1dbdf6f6ae24b6eae6c)
2013-01-16 15:23:36 -05:00
Reid Barton 3c1f08c394 Add --stream option to print-messages, print-next-message API examples
(imported from commit aeaf8a111759de59ba87fc7014be86bd13810271)
2013-01-16 14:19:05 -05:00
Tim Abbott 5601086575 populate_db: Remove obsolete mit_subs_list.
(imported from commit 601cde1ae95d3e262be8444ded48f1fdca489f7b)
2013-01-08 17:23:22 -05:00
Jessica McKellar 5cf5bcaed5 Add logging for the feedback bot.
(imported from commit 4beb3ec69330baf0305ff0509900a5039145f4f4)
2013-01-08 10:53:33 -05:00
Tim Abbott f039623f2c zmirror: Fix running on 32 bit systems.
(This also needs pyzephyr to be compiled for 32 bit).

(imported from commit 06e33e17be517483213d402dd75ec2ac168395d1)
2013-01-02 14:20:24 -05:00
Tim Abbott bc2a5bad0b zephyr_mirror: Use modern default_format that discourages displaying it.
(imported from commit bfb2ffbf4ca7d424ffe54c4b2752378f4854db25)
2013-01-02 14:10:21 -05:00
Tim Abbott 429daf3c44 zmirror: Fix use of print rather than logging.foo in send_zephyr.
(imported from commit 7188f5364a864f2f144fb630d7a8c85d69219c42)
2013-01-02 14:10:21 -05:00