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.
- Host: GitHub
- URL: https://github.com/signiant/plumber
- Owner: Signiant
- License: mit
- Created: 2023-11-28T23:02:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-29T18:15:53.000Z (over 2 years ago)
- Last Synced: 2025-03-05T13:49:02.245Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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