An open API service indexing awesome lists of open source software.

https://github.com/signiant/plumber

A tool that deletes Bitbucket pipeline build steps that are now obsolete and opens a PR in the given repo.
https://github.com/signiant/plumber

Last synced: 11 months ago
JSON representation

A tool that deletes Bitbucket pipeline build steps that are now obsolete and opens a PR in the given repo.

Awesome Lists containing this project

README

          

# Plumber

A tool that deletes Bitbucket pipeline build steps that are now obsolete and opens a PR in the given repo.

## How do I get set up?

This tool requires 3 things to be done before being able to run the script.

### Dependencies

To install this script's dependencies, run the following command:
`pip install -r requirements.txt`

### Environment variables

As this tool requires authentication to connect to the Bitbucket API, you will need to set 2 environment variables:
1. BB_USER_ID
2. BB_APP_PASS

### Configuration

Finally, this tool requires a JSON formatted configuration file. By default, it assumes the filepath to
be `./config.json`, but this can be changed using the `-c` argument.

The config file should be structured as follows:
```json
{
"workspace": "",
"repositories": [
""
],
"steps": [
{
"name": "",
"files": [
""
]
}
],
"reviewers": [
{
"account_id": ""
}
]
}
```
Use the following endpoint, replacing all values where needed, to find the account ids of each reviewer:
https://bitbucket.org/!api/2.0/workspaces//members

# TODO
- Refactor to utilize asyncio
- Use regex when finding build steps for deletion
- Add method of dynamically retrieving reviewer account ids
- Modify logic to create only one PR per repository if multiple steps are being removed