git-debranch
Git subcommand that uses SpiffWorkflow to remove branches that are no longer needed.
Installation
pip install git-debranch
Running
git debranch
From inside a git repository, running git debranch will present you with a list of branches that could
be deleted. This list is presented using $EDITOR. If the environment variable is not set vi is used
as the fallback.
Please note git fetch -p is run before the branch list is presented. This can be disabled by providing
the --offline switch.
Usage
usage: git debranch [-h] [--offline] [--dry-run]
Delete local git branches
options:
-h show this help message and exit
--offline Do not run online operations such as fetch and prune
--dry-run Do not actually delete branches
Editing the Branch List
When $EDITOR is invoked, it will contain a series of lines. Comment lines begin with # and any line that
is not empty or a comment is assumed to be the name of a branch to delete locally. You can update this list
by either removing or commenting branches that you want to keep. Branches that appear safe to delete are
uncommented by default. Branches that may not be safe to delete are left commented by default. When you save
and close $EDITOR any uncommented branches will be deleted using git branch -D.
Developing
In my opinion this project turned out to be quite pleasurable to work with. Please feel free to play with
the code. TODO.md has some loose TODO items that may turn into issues at some point.
Development Installation
pip install -r dev_requirements.txt
You likely want to be inside a venv. This wlll give you an editable installation so you can run the program and see changes. If you add a new bpmn/json file then you need to re-run this command.
Using SpiffArena for BPMN edits
SpiffArena is used to make edits to the BPMN files that are
bundled with this program. To start the editor run make run-editor. You will be presented with a message
once started to go to http://localhost:8001 (assuming the default configuration is used). The editor
requires docker and docker compose to run.
From there you can edit the diagrams but you cannot run them from within SpiffArena at this time. Some work
would need to be done to support our custom Connector Proxy that is not http based. You can however run
the Script Task unit tests, which were very helpful during development.
When finished you can make stop-editor. If you would like to pull the latest version of SpiffArena use
make update-editor.
Metadata
Release files for git-debranch 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| git-debranch-0.1.9.tar.gz | 22.5 kB | Without provenance | Details for git-debranch-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| git_debranch-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for git_debranch-0.1.9-py3-none-any.whl |
Total release size: 50.0 kB
Release files / git-debranch-0.1.9.tar.gz
| Download URL | git-debranch-0.1.9.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecb6374e2b179baa4f0a9de74e8619bcc61442d2c6bba2cc0326f696f36cb329
|
|
BLAKE2b-256 checksum How to use checksums |
cdc0bdea46b07d022343221c3b771b7a9a343ef470aa4a1fc073f895c4068709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / git_debranch-0.1.9-py3-none-any.whl
| Download URL | git_debranch-0.1.9-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
188da3a3e725eef81f074c179bbb91570c96b7d183fbf2a6835841cfd0be54b1
|
|
BLAKE2b-256 checksum How to use checksums |
3f740aa0a55b0ddcc0965f8d9c49173c9d68268a91335724efc9c8f034e97e39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Security for git-debranch 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.