hubot-bitbucket-pr
Holler whenever anything happens around a Bitbucket pull request
Last updated 3 years ago by tshedor .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-bitbucket-pr 
SYNC missed versions from official npm registry.

Hubot Bitbucket Pull Request

Holler whenever anything happens around a Bitbucket Pull Request or Issue

Build Status

Features

  • Notifies room when a pull request is created, commented, declined, merged, updated, approved or unapproved
  • Default room can be set with HUBOT_BITBUCKET_PULLREQUEST_ROOM
  • Pretty formatting if using the Slack adapter

Installation

In your hubot directory, run:

npm install hubot-bitbucket-pr --save

Then add hubot-bitbucket-pr to your external-scripts.json:

["hubot-bitbucket-pr"]

Configuration

Set up a Bitbucket Pull Request hook by checking all boxes and setting the URL to: {your_hubot_base_url}/hubot/bitbucket-pr

A default room can be set with HUBOT_BITBUCKET_PULLREQUEST_ROOM. If this is not set, a room param is required in the URL: ...bitbucket-pr?room={your_room_id}

Example

$ heroku config:add HUBOT_BITBUCKET_PULLREQUEST_ROOM=pull-requests
# If you're not on Heroku
$ export HUBOT_BITBUCKET_PULLREQUEST_ROOM=pull-requests

Pull Request Configuration

A list of announce events can be set with HUBOT_BITBUCKET_PULLREQUEST_ANNOUNCE. This comma-separated list sets what events hubot will share in the designated room. Possible options are:

  • created
  • updated
  • declined
  • merged
  • comment_created
  • approve
  • unapprove

If left blank, hubot will announce everything.

Issue Configuration

Issue-specific events can be appended to HUBOT_BITBUCKET_PULLREQUEST ANNOUNCE. Possible options are:

  • issue_created
  • issue_updated
  • issue_comment_created

Again, if left blank, hubot will announce everything.

Example

$ heroku config:add HUBOT_BITBUCKET_PULLREQUEST_ANNOUNCE=created,merged,issue_created
# If you're not on Heroku
$ export HUBOT_BITBUCKET_PULLREQUEST_ANNOUNCE=created,merged,issue_created

Commands

This is only a notifier, nothing more.

Notes

v0.3 >= required the Pull Request URL be set to ...bitbucket-pr?name={your_repo_name}. Bitbucket's Webhook 2.0 now includes the repo name in the API response; v0.4 <= removes this requirement as a non-breaking change.

Issue support is available in v1.0 <=.

Testing

Please add a test to test/bitbucket-pr_test.coffee before adding a new feature.

npm install
npm run test

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

8 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
  • 0.5.2                                ...           4 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (5)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |