Metadata-Version: 2.1
Name: bitbucket-hook-diffstat
Version: 0.1.1
Summary: 
Author: Vlad
Author-email: vova.avdoshka@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: requests (>=2.28.1,<3.0.0)
Description-Content-Type: text/markdown

# Bitbucket hook diffstat

## Overview

This is a simple webhook handler for Bitbucket repository push events.

It processes branch update and branch create events and extracts the file paths which were changed in that event.
In case of branch update event get's the changset between current HEAD of the branch and the previous HEAD of that branch.
In case if branch is created it get's the changset between current HEAD of the branch and HEAD of main branch of the repository.

## Usage
Set following environment variables:
```
BITBUCKET_PROJECT_SLUG
BITBUCKET_REPO_SLUG
BITBUCKET_USER
BITBUCKET_PASSWORD
```
Where `BITBUCKET_PASSWORD` is an "app password" and `BITBUCKET_USER` is available as "Username" in Bitbucket profile settings.

Replace or enhance `class Handler` with your custom logic to trigger some custom CI pipelines for example.

Host it somewhere

Create the PUSH webhook trigger in your Bitbucket repository.
