Skip to main content

Tool to provide task id, retrieved from branch name, right into commit message.

Project description

PyRust Task ID

PyRust Task ID MIT GitHub Actions Workflow Status

A written in Rust tool for Python programs that automatically pull task id from branch name to commit message.

Example

Let's imagine you have branch project_name/TASK-111-implement-feature and you need to provide the task TASK-111 into commit message.
Then you can just use this tool.

First, just add hook into .pre-commit-config.yaml:

-   repo: https://github.com/vanya909/pyrust-task-id-pre-commit
    rev: 0.1.0
    hooks:
    -   id: pyrust-task-id
        stages: [commit-msg]
        args:
        -   "project_name/(?P<task_template>TASK-[0-9]{3})-.*"
        -   "{subject}\\n\\n{body}\\n\\nTask ID: {task_id}"

Then run

pre-commit install --hook-type "commit-msg"

Then commit

git commit -m"My cool feature" -m"Can't wait to see this feature in prod."

And then you'll see following commit message:

My cool feature

Can't wait to see this feature in prod.

Task ID: TASK-111

This project uses standalone repo for pre-commit hook because it requires pre-build python wheels from 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

pyrust_task_id-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

pyrust_task_id-0.1.1-py3-none-win_amd64.whl (1.7 MB view details)

Uploaded Python 3 Windows x86-64

File details

Details for the file pyrust_task_id-0.1.1.tar.gz.

File metadata

  • Download URL: pyrust_task_id-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for pyrust_task_id-0.1.1.tar.gz
Algorithm Hash digest
SHA256 004ebc0cea0b985ef8349a51217faebd044d74347e1335246bbf5a251f10df79
MD5 f957c54dbf86375cd53e6bc40a018ee8
BLAKE2b-256 09e70058bffedb07425c11387b23ae0e1e513eee15447969171ba2ec8d7d84c0

See more details on using hashes here.

File details

Details for the file pyrust_task_id-0.1.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for pyrust_task_id-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5a5ecf6231a45e99c4662be9e20a0a57479f52d55f29c078e8339ad50dd60dcd
MD5 2a18fd29b7cd34dbf5bda05d1b4544a1
BLAKE2b-256 2e838751efa91b487464de7001e87195aff169d456293c8f9dfcb747fe0bffc1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page