GithubHelp home page GithubHelp logo

bbpp's Introduction

bbpp

This module monitors any BitBucket repository and sends an OS notification whenever is any status change in the last 10 pipelines of the repo. It will stop notifying every 10 seconds after the first notification and will keep doing that until the script is exited with ctrl+c.

Prerequisites

You will need your BitBucket credentials, which you can get from your BitBucket account settings.

Username

You can find your username in the BitBucket settings page. Click on the cogwheel / Personal BitBucket settings / Account settings / Username.

Password

The password in this script is an APP password. Click on the cogwheel / Personal BitBucket settings / App passwords / Create app password. Give it a name and grant next permissions:

  • Account read
  • Projects read
  • Repositories read
  • Pipelines read

Installation

macos

pip install bbpp

Windows

  • Install python from the Microsoft Store
  • Install pip
python -m ensurepip --upgrade
  • Install bbpp
pip install bbpp

Read the installation warning

WARNING: The script bbpp.exe is installed in 'C:Users...' which is not on PATH. Consider adding this directory to PATH or, if your prefer to suppress this warning, use --no-warn-script-location.
export PATH with where the script bbpp is available.

You will need to edit your PATH to include the installation directory mentioned on the warning.

Linux

This hasn't been tested on Linux yet, the installation should work but the notifications will surely fail. Feel free to open a PR including the notification support for Linux. :)

Configuration

Configure credentials:

bbpp config -u username -p apikey -w workspace

Where username and apikey are the credentials obtained from the prerequisites section and workspace is the name of the workspace you want to monitor the pipelines from.

This would write a json configuration file at ~/.bbpp/bbpp.conf (Windows users sorry about that)

You can also customize the sound played with the macos nofitication.

How to use?

bbpp -r regex

where regex is part of the repository name you want to monitor. It will try to match to /.regex./ if there is more than one match it will exit and you will need to provide a more specific regex.

Contribute

Contributions are more than welcomed!

License

BSD

bbpp's People

Contributors

sergiopena avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.