Bitdock. Release 0.1.0

Similar documents
Clique. Release 1.3.1

Pulp Python Support Documentation

Release Nicholas A. Del Grosso

Python Project Example Documentation

Poetaster. Release 0.1.1

Frontier Documentation

eventbrite-sdk-python Documentation

TPS Documentation. Release Thomas Roten

thingspeak Documentation

TangeloHub Documentation

chatterbot-weather Documentation

google-search Documentation

dota2api Documentation

BanzaiDB Documentation

I2C LCD Documentation

PyCon APAC 2014 Documentation

sainsmart Documentation

Python AutoTask Web Services Documentation

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

Roman Numeral Converter Documentation

Google Domain Shared Contacts Client Documentation

Python simple arp table reader Documentation

Release Fulfil.IO Inc.

Django-CSP Documentation

Redis Timeseries Documentation

Belle II - Git migration

django-reinhardt Documentation

Continuous translation with Weblate. Michal Čihař

Python wrapper for Viscosity.app Documentation

Kivy Designer Documentation

Simple libtorrent streaming module Documentation

olapy Documentation Release Abilian SAS

bottle-rest Release 0.5.0

Moodle Destroyer Tools Documentation

bulbea Release 0.1.0

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras

Poulpe Documentation. Release Edouard Klein

Git Basi, workflow e concetti avanzati (pt2)

retask Documentation Release 1.0 Kushal Das

YouTube API Wrapper Documentation

I hate money. Release 1.0

DNS Zone Test Documentation

cwmon-mysql Release 0.5.0

RandoPony Documentation

withenv Documentation

PyCRC Documentation. Release 1.0

Django-Select2 Documentation. Nirupam Biswas

Pulp OSTree Documentation

f5-icontrol-rest Documentation

turbo-hipster Documentation

RiotWatcher Documentation

PowerShell-Module Documentation. Release docs

Aircrack-ng python bindings Documentation

nidm Documentation Release 1.0 NIDASH Working Group

Python State Machine Documentation

Gearthonic Documentation

OTX to MISP. Release 1.4.2

Archan. Release 2.0.1

viki-fabric-helpers Documentation

ejpiaj Documentation Release Marek Wywiał

contribution-guide.org Release

pytest-benchmark Release 2.5.0

Magento OpenERP Integration Documentation

Make sure to mark it private. Make sure to make it a Mercurial one and not a Git one.

ZK Watcher Documentation

Pykemon Documentation

diceware Documentation

Gunnery Documentation

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command:

Python-Django-DevOps Documentation

lazy-object-proxy Release 1.3.1

Django-frontend-notification Documentation

django-dynamic-db-router Documentation

deepatari Documentation

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

Python Finite State Machine. Release 0.1.5

Getting Started With Windows 10

Release Ralph Offinger

Signals Documentation

Tips on how to set up a GitHub account:

Game Server Manager Documentation

FEEG Applied Programming 3 - Version Control and Git II

Django MFA Documentation

doconv Documentation Release Jacob Mourelos

Archer Documentation. Release 0.1. Praekelt Dev

Behat Drupal Integration Documentation

manifold Documentation

API Wrapper Documentation

Version Control. Version Control

dh-virtualenv Documentation

e24paymentpipe Documentation

open-helpdesk Documentation

mri Documentation Release Nate Harada

dh-virtualenv Documentation

AnyDo API Python Documentation

Python Schema Generator Documentation

Continuous Integration (CI) with Jenkins

Dell EMC Networking Napalm Integration Documentation

Version Control. Ioannis N. Athanasiadis. with slides from Solution Perspective Media and Software Carpentry

PyZillow Documentation

Transcription:

Bitdock Release 0.1.0 August 07, 2014

Contents 1 Installation 3 1.1 Building from source........................................... 3 1.2 Dependencies............................................... 3 2 Usage 5 2.1 Mapping Users.............................................. 6 3 API reference 9 3.1 bitdock................................................ 9 4 Glossary 11 5 Indices and tables 13 6 Copyright and license 15 Python Module Index 17 i

ii

Bitdock, Release 0.1.0 Intermediate service to handle Bitbucket pull-request notifications and push them into Flowdock Contents 1

Bitdock, Release 0.1.0 2 Contents

CHAPTER 1 Installation Installation is simple with pip: $ pip install bitdock 1.1 Building from source You can also build manually from the source for more control. First obtain a copy of the source by either downloading the zipball or cloning the public repository: git clone git@bitbucket.org:ftrack/bitdock.git Then you can build and install the package into your current Python site-packages folder: python setup.py install Alternatively, just build locally and manage yourself: python setup.py build 1.1.1 Building documentation from source To build the documentation from source: python setup.py build_sphinx Then view in your browser: file:///path/to/bitdock/build/doc/html/index.html 1.2 Dependencies Python >= 2.6, < 3 CherryPy >= 3.2, < 4 requests >= 2.2, < 3 3

Bitdock, Release 0.1.0 1.2.1 Additional For testing Pytest >= 2.3.5, < 3 4 Chapter 1. Installation

CHAPTER 2 Usage Once installed you need to grab a relevant API token from Flowdock. Go to https://www.flowdock.com/account/tokens and copy an appropriate token (for example, a token for a flow called Dev ): Then start the Bitdock service from the command line passing your copied API token as the sole parameter: python -m bitdock [YOUR_FLOWDOCK_API_KEY] Note: To see additional runtime options (such as setting host and port interface) use: python -m bitdock --help Now the server is up and running it is time to head over to the Bitbucket project you want to receive notifications for. Once there, navigate to the Settings Hooks page and add a new Pull Request POST hook. Check only the Create / Edit / Merge / Decline option and then enter the full public URL to your running server adding /bitbucket-pull-request at the end. For example: http://example.com:9000/bitbucket-pull-request 5

Bitdock, Release 0.1.0 Click Save. Now whenever a Bitbucket pull request is created or updated you should see a new entry in your Flowdock inbox for the configured flow. Note: Assigned reviewers will show up as people tags on the inbox entry. 2.1 Mapping Users As folks may have different user details on Bitbucket and Flowdock there is a basic way to map from one to the other. Start the server passing in a path to a JSON file containing mappings or Bitbucket usernames to Flowdock user details. For example: my_mappings.json { "martin": { "username": "mphillips", "display_name": "Martin Pengelly-Phillips", "email": "martin@example.com" 6 Chapter 2. Usage

Bitdock, Release 0.1.0 } },... Run the server using: python -m bitdock --user-mapping my_mappings.json 2.1. Mapping Users 7

Bitdock, Release 0.1.0 8 Chapter 2. Usage

CHAPTER 3 API reference 3.1 bitdock class bitdock. main.bitdock(flowdock_api_key, user_mapping=none) Bases: object Bitdock main handler. init (flowdock_api_key, user_mapping=none) Initialise handler with flowdock_api_key. In addition, optionally specify a user_mapping to use when mapping users. It should be a dictionary of Bitbucket user names against Flowdock user dictionaries. The Flowdock user dictionary should contain keys for username, display_name and email. bitbucket_pull_request() Handle bitbucket pull request notification. flowdock_api_url Return flowdock api url. bitdock. main.main(arguments=none) Bitdock: Connect Bitbucket and Flowdock. 9

Bitdock, Release 0.1.0 10 Chapter 3. API reference

CHAPTER 4 Glossary 11

Bitdock, Release 0.1.0 12 Chapter 4. Glossary

CHAPTER 5 Indices and tables genindex modindex search 13

Bitdock, Release 0.1.0 14 Chapter 5. Indices and tables

CHAPTER 6 Copyright and license Copyright (c) 2014 ftrack Licensed under the Apache License, Version 2.0 (the License ); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE.txt file, or at: http://www.apache.org/licenses/license-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 15

Bitdock, Release 0.1.0 16 Chapter 6. Copyright and license

Python Module Index _ bitdock. main, 9 b bitdock, 9 17