https://github.com/pylipp/bibu
A Bitbucket command line client written in bash
https://github.com/pylipp/bibu
bash bitbucket command-line rest-api
Last synced: 6 months ago
JSON representation
A Bitbucket command line client written in bash
- Host: GitHub
- URL: https://github.com/pylipp/bibu
- Owner: pylipp
- License: mit
- Created: 2019-09-20T20:28:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T21:21:28.000Z (over 5 years ago)
- Last Synced: 2025-03-05T05:19:03.348Z (over 1 year ago)
- Topics: bash, bitbucket, command-line, rest-api
- Language: Shell
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# `bibu`
[](https://travis-ci.org/pylipp/bibu)
A Bitbucket command line client written in bash.
## Installation
`bibu` is distributed as Python package. It's best downloaded from the Python Packaging Index PyPI by
pip install --user bibu
Alternatively you can install the relevant bash files: the main executable `bibu` into `~/.local/bin` and the bash library `bibu.bash` into `~/.local/lib`.
In either case take care to add `~/.local/bin` to your `$PATH`.
### Bitbucket authentication
Obtain OAuth consumer key and secret from your Bitbucket profile settings:
- Bitbucket settings -> Access management -> OAuth -> Add consumer
- enter name and callback URL (e.g. https://google.com)
- adjust permissions (`team pipeline:variable webhook pullrequest:write snippet:write wiki repository:admin project issue:write account`)
- save
- copy key and secret to environment variable `$BITBUCKET_REST_API_AUTH` (separated by colon)
### Dependencies
`bibu` depends on `curl` and `jq`.
It's tested against `bash` 4.4.19, `curl` 7.64.0, `jq` 1.6 in an Alpine Linux Docker image.
## Usage
Consult `bibu --help`
bibu operates on the repository of the current working directory, and derives
information from 'git-remote'.
Available commands:
issue Manage Bitbucket issues
pipeline Manage Bitbucket pipelines
pr Manage Bitbucket pullrequests
api Get resource via REST API
General options:
--help Display help message
## Examples
Start a pipeline called `all-tests` on current HEAD
bibu pipeline run -n all-tests
View most recent pipeline runs
bibu pipeline list
Create a pull-request. You will be prompted for title and description (using `$EDITOR`).
bibu pr create
Get the patch of the pull-request #42
bibu api pullrequests/42/patch
Get comments on issue #7
bibu api issues/7/comments | jq '.values[] | .content.raw'
## Ideas
Future features... Feel free to contribute!
### Pipelines
- trigger
- list / status
- browse
### Pull requests
- create
- list
- review
### Issues
- create
- list
- update
- comment
## Contributing
### Set up
Fetch the Docker image
docker pull pylipp/bibu:latest
Install development dependencies into Python venv
pip install -U .[dev]
### Testing
Tests are written with bats. Execute test suite
./run test
or a dedicated test
./run test tests/cli.bats
### Development installation
Editable pip-install is not compatible with using the `data_files` option in `setup.py`. Hence apply the work-around
./run install
### Release
1. Tag latest commit on master by version number acc. to format `vX.Y.Z`.
1. `./run release`
## Related projects
- [gh](https://github.com/cli/cli)
- [hub](https://github.com/github/hub)
- [Python wrapper for Atlassian REST APIs](https://github.com/atlassian-api/atlassian-python-api)
- open an issue or a pull request to extend the list :)