Skip to main content

Mercurial hook to report incoming changesets to Campfire chatroom

Project description

hgcampfire

hgcampfire provides a Mercurial hook to notify a Campfire chatroom about changesets coming in to a repository.

Usage

Add the following to your Mercurial config (in a system, user, or repo-level hgrc file), replacing the API key, URL, and room ID:

[campfire]
api_key = CAMPFIRE_AUTH_TOKEN_FOR_THE_USER_NOTIFICATIONS_WILL_COME_FROM
url = http://myorg.campfirenow.com
room = 123456

[hooks]
changegroup.campfire = python:hgcampfire.notify

These configs can of course be separated into different hgrc files, for instance if you want to specify the Campfire data user-wide, but apply the actual hook only to certain repositories.

Customization

You can modify the template hgcampfire uses for its notification by setting the template config value in the [campfire] section. The default value is {user} pushed:\n{changesets}. This template has the following context available to it: root is the repository root path, user is the value of the $USER environment variable, and changesets is the list of changesets pushed.

You can also modify the template hgcampfire uses to report each changeset, by setting the cset_template config value in the [campfire] section. This should be a Mercurial changeset template, of the same form you’d pass to –template. The default value is * "{desc}" by {author}.

CHANGES

tip (unreleased)

0.2.2 (2010.06.10)

  • don’t let Python 2.5 and earlier raise HTTPError on 201 response code

  • list multiple changesets in most-recent-first order

0.2.1 (2010.06.08)

  • don’t force the message type to TextMessage

0.2.0 (2010.06.08)

  • initial working version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hgcampfire-0.2.2.tar.gz (9.2 kB view details)

Uploaded Source

File details

Details for the file hgcampfire-0.2.2.tar.gz.

File metadata

  • Download URL: hgcampfire-0.2.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hgcampfire-0.2.2.tar.gz
Algorithm Hash digest
SHA256 8a3a03da7faedb5709d3195d38125de0441bd0be73d270e50ea29b7344bdb985
MD5 22b2251dc1e4adf537ad873d041daacf
BLAKE2b-256 cdb48b7b8e9c0f3b229734b4d0d981e7dcec5f9f3d3b6b6ced612f3ac1e5e0ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page