Command-line application to get or set github commit status.
Project description
Introduction
This command-line application is mainly for continuous build and integration environments. It allows one to set provide all of the details necessary to mark a commit, for pull requests, to read “All is Well” or “Merge with Caution” with an optional hyperlink to the CI build server, or description of build failure.
This is done using the Github v3 API.
This is not a very serious package, there are not any plans to advance it further. It was authored because existing github python client packages such as pygithub3 did not offer the ability to communicate with the ‘statuses’ api endpoints, and it is preferred to provide well-readable command-line arguments in the build script than to use curl directly.
Installation
The stable version of this package is maintained on pypi, install using pip:
pip install ghstat
Generate a personal access token, https://github.com/settings/applications, enabling scope repo:status and public_repo or private_repo, respectively.
Use this token for the –token parameter.
Examples
failing a build on github.com:
ghstat.py set --token 0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d \ --commit 72b74be0de46392a05d8f470b64272b8036e63f8 \ --user jquast --repo ghstat --state success
retrieving the status of a commit:
ghstat.py get --token 0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d \ --commit 72b74be0de46392a05d8f470b64272b8036e63f8 \ --user jquast --repo ghstat
linking to a private bamboo and github enterprise account:
ghstat.py set --token 0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d \ --commit 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a \ --user jquast \ --repo ghstat \ --state success \ --description 'build successful' \ --target-url 'https://bamboo.mycorp.com/browse/PROJ-BUILD10-1' \ --base-url 'https://github.mycorp.com/api/v3/'
Others
githubdate: Same thing, only it uses an .ini file instead of cmd-line parameters.
Changes
- 0.1.0
Initial release to pypi
Project details
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 ghstat-0.1.1.tar.gz
.
File metadata
- Download URL: ghstat-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d409ffecbb9a616ee43dfef4564011a827114f06800ccc267ff59e6d4a8f6920 |
|
MD5 | 6dceb1491184cfc6604493be2a03a782 |
|
BLAKE2b-256 | 6336f1ad08126958013781c3b263116b2f70208a0dbd5770aa6138617902d31b |
File details
Details for the file ghstat-0.1.1-cp27-none-macosx_10_10_x86_64.whl
.
File metadata
- Download URL: ghstat-0.1.1-cp27-none-macosx_10_10_x86_64.whl
- Upload date:
- Size: 5.4 kB
- Tags: CPython 2.7, macOS 10.10+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41342ed8df8ff7a9c7d0b200217747cd54c1c8a6fd5990148dd167ab8d549cd1 |
|
MD5 | ce0127bcef4e83ab65f14ed32afdf87c |
|
BLAKE2b-256 | cb297458e1a940f90655cfae82fef73a8dd2f0df507038f4ef611067355b59de |