No project description provided
Project description
gpush
gpush
is a command line utility for standardising commit messages using Conventional Commits. It is designed to be used in conjunction with python-semantic-release to automate the release of your python package based on commits that are made on a branch when a PR is merged.
Signing commits
gpush
natively supports signing commits using GPG. To enable this, you will need to have GPG installed and configured on your machine. You can find instructions on how to do this here.
Installation
This package is available for installation via pypi using pip3:
pip3 install gpush
Usage
When running gpush in a git directory, use gpush
to replace your standard git commit && git push
commands. gpush
will ask a few questions to determine detail about your commit and generate a conventionally formatted git commit message.
Example
To see additional options available, run gpush with the --help
flag
gpush --help
Local development
To develop locally, uninstall any existing version of gpush before executing the pip3 installation in the local directory, use Makefile command to do this:
make dev
Unit tests
To run unit tests, execute the following command, you will need to have pytest installed and set environment
variable GITHUB_TOKEN
to a valid GitHub token that has permissions to create/delete and push to a repository
within your account.
make test
The unit tests will create a test repository within your account for each unit test before testing functionality and deleting the repository.
python-semantic-release
gpush
generates commit messages that are compliant with python-semantic-release. This allows you to automate the release of your python package using GitHub Actions.
To use python-semantic-release, you will need to create a GitHub Action workflow that runs on the main
branch. The workflow will need to checkout the code, install python-semantic-release and then run the release command. The following is an example workflow that will run on the main
branch and release a new version of your package and push to PyPI when a PR is merged.
You will need to create a PyPI token and add it to your GitHub repository secrets (As PYPI_TOKEN
). You can find instructions on how to do this here.
.github/workflow/release.yml
name: Semver Bump
on:
push:
branches:
- "main"
jobs:
auto-semver:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: "Python Semantic Release"
uses: "python-semantic-release/python-semantic-release@master"
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
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 gpush-3.1.2.tar.gz
.
File metadata
- Download URL: gpush-3.1.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.3 tqdm/4.65.0 importlib-metadata/6.6.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d2f7949000e94140d04d5a0c84c9d90ee23998ff94f349116ebc826e3a15fd6 |
|
MD5 | 611bd7c0f6be2c7ece43fabd22d5dedf |
|
BLAKE2b-256 | 9590975392d1c25b45902342694567d779cb82e5e85347b9f20d5891b5062b23 |
File details
Details for the file gpush-3.1.2-py3-none-any.whl
.
File metadata
- Download URL: gpush-3.1.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.3 tqdm/4.65.0 importlib-metadata/6.6.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65343eb173650c811b774ed4bb9993a751a7e78643199eb4b68a6a0cbfe09b65 |
|
MD5 | 409dfbbb734c300e0c95d71f14a29569 |
|
BLAKE2b-256 | 15ee3a038838d8147b07d5d91ec0c2756be5a58822efc6b65b2c3d276087b815 |