Hubtty is a console-based interface to the Github Code Review system.
Project description
Hubtty is a console-based interface to the Github Code Review system.
As compared to the web interface, the main advantages are:
Workflow – the interface is designed to support a workflow similar to reading network news or mail. In particular, it is designed to deal with a large number of review requests across a large number of repositories.
Offline Use – Hubtty syncs information about pull requests in subscribed repositories to a local database and local git repos. All review operations are performed against that database and then synced back to Github.
Speed – user actions modify locally cached content and need not wait for server interaction.
Convenience – because Hubtty downloads all pull requests to local git repos, a single command instructs it to checkout a pull request into that repo for detailed examination or testing of larger pull requests.
Installation
Source
When installing from source, it is recommended (but not required) to install Hubtty in a virtualenv. To set one up:
virtualenv hubtty-env source hubtty-env/bin/activate
To install the latest version from the cheeseshop:
pip install hubtty
To install from a git checkout:
pip install .
Hubtty uses a YAML based configuration file that it looks for at ~/.config/hubtty/hubtty.yaml. Several sample configuration files are included. You can find them in the examples/ directory of the source distribution or the share/hubtty/examples directory after installation.
Select one of the sample config files, copy it to ~/.config/hubtty/hubtty.yaml and edit as necessary. Search for CHANGEME to find parameters that need to be supplied. The sample config files are as follows:
- minimal-hubtty.yaml
Only contains the parameters required for Hubtty to actually run.
- reference-hubtty.yaml
An exhaustive list of all supported options with examples.
- openshift-hubtty.yaml
A configuration designed for OpenShift reviews.
Hubtty uses local git repositories to perform much of its work. These can be the same git repositories that you use when developing a project. Hubtty will not alter the working directory or index unless you request it to (and even then, the usual git safeguards against accidentally losing work remain in place). You will need to supply the name of a directory where Hubtty will find or clone git repositories for your projects as the git-root parameter.
The config file is designed to support multiple Github instances. The first one is used by default, but others can be specified by supplying the name on the command line.
Usage
After installing Hubtty, you should be able to run it by invoking hubtty. If you installed it in a virtualenv, you can invoke it without activating the virtualenv with /path/to/venv/bin/hubtty which you may wish to add to your shell aliases. Use hubtty --help to see a list of command line options available.
Once Hubtty is running, you will need to start by subscribing to some repositories. Use ‘L’ to list all of the repositories and then ‘s’ to subscribe to the ones you are interested in. Hit ‘L’ again to shrink the list to your subscribed repositories.
In general, pressing the F1 key will show help text on any screen, and ESC will take you to the previous screen.
Hubtty works seamlessly offline or online. All of the actions that it performs are first recorded in a local database (in ~/.local/share/hubtty/hubtty.db by default), and are then transmitted to Github. If Hubtty is unable to contact Github for any reason, it will continue to operate against the local database, and once it re-establishes contact, it will process any pending changes.
The status bar at the top of the screen displays the current number of outstanding tasks that Hubtty must perform in order to be fully up to date. Some of these tasks are more complicated than others, and some of them will end up creating new tasks (for instance, one task may be to search for new pull requests in a repository which will then produce 5 new tasks if there are 5 new pull requests).
If Hubtty is offline, it will so indicate in the status bar. It will retry requests if needed, and will switch between offline and online mode automatically.
If you review a pull request while offline with a positive vote, and someone else leaves a negative vote on that pull request before Hubtty is able to upload your review, Hubtty will detect the situation and mark the pull request as “held” so that you may re-inspect the pull request and any new comments before uploading the review. The status bar will alert you to any held pull requests and direct you to a list of them (the F12 key by default). When viewing a pull request, the “held” flag may be toggled with the exclamation key (!). Once held, a pull request must be explicitly un-held in this manner for your review to be uploaded.
If Hubtty encounters an error, this will also be indicated in the status bar. You may wish to examine ~/.hubtty.log to see what the error was. In many cases, Hubtty can continue after encountering an error. The error flag will be cleared when you leave the current screen.
To select text (e.g., to copy to the clipboard), hold Shift while selecting the text.
MacOS
The MacOS terminal blocks ctrl+o, which is the default search key combo in Hubtty. To fix this, a custom keymap can be used on MacOS which modifies the search key combo. For example:
keymaps: - name: default # MacOS blocks ctrl+o pr-search: 'ctrl s' interactive-search: 'ctrl i'
Contributing
For information on how to contribute to Hubtty, please see the contents of the CONTRIBUTING.rst file.
Bugs
Bugs are handled at: https://github.com/hubtty/hubtty/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hubtty-0.1.1.tar.gz
.
File metadata
- Download URL: hubtty-0.1.1.tar.gz
- Upload date:
- Size: 108.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a16b4ff39b5680109f44bd85f27aa03023cc7bdce661867afcd0612661ef4c2b |
|
MD5 | e905f43d0deb57cdd0f11cb79c073d6f |
|
BLAKE2b-256 | 7f093804640903652f9e16959f4e333b2d9385492be0441540abd39cce40e1db |
File details
Details for the file hubtty-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: hubtty-0.1.1-py3-none-any.whl
- Upload date:
- Size: 115.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b839dbd8a1eb8b82699038f8ad6291fb4f2e1edeb26b6eb3e3e85feb658592 |
|
MD5 | 7636acf05ebadeed8163c34ad3ce9972 |
|
BLAKE2b-256 | 732ddab43fe4b2c0cbd6b4ddad173a21555ea9b166df34b5c764c0c14a23a995 |