Skip to main content

Auto-commit tool integrated with Stackspot AI

Project description

Stackspot Commit Helper

Overview

The Stackspot Commit Helper is a Python tool that automates Git commit message generation using Stackspot AI. It analyzes your code changes and creates meaningful commit messages while handling the commit and push operations seamlessly.

Features

  • 🤖 AI-Powered Commit Messages: Generates contextual commit messages based on your code changes
  • 🔄 Automated Git Workflow: Handles staging, commit and push operations
  • 🔢 Branch Number Integration: Optional inclusion of branch numbers in commit messages
  • Simple CLI Interface: Easy to use command-line tool
  • 🔐 Secure Configuration: Environment variable based configuration

Stackspot Credentials

To use Stackspot's AI for commit message generation, you must set up credentials with the Stackspot Platform.

  1. Create an account at Stackspot Platform.

  2. Go to Stackspot AI.

  3. Access Profile → Access Token.

  4. Create new credentials and copy the following:

    Client ID

    Client Secret

    Realm

Installation

Install using pip:

pip install stackspot-commit-helper

After installation, set the following environment variables to configure the tool based on your system::

STACKSPOT_CLIENT_ID="your_client_id"
STACKSPOT_CLIENT_SECRET="your_client_secret"
STACKSPOT_REALM="your_realm"
QUICK_COMMAND_COMMIT="your_quick_command_name"  # Optional: if your account has the 'generate-git-commit-message' command

Usage

Once the tool is installed and configured, you can use it from the terminal:

Commit and Push To run the tool and generate a commit message based on the code changes:

scommit

Include Branch Number If you want to include the current branch number in your commit message, you can use the -b or --branch option:

scommit -b

This will prepend the branch number (if available) to the generated commit message, like [#123] - <commit_message>.

Dependencies

This tool requires the following Python packages:

python-dotenv – For loading environment variables from a .env file.

stackspot – For interacting with Stackspot's AI services.

Troubleshooting

No Changes to Commit

If the tool reports "No changes to commit", it means that there are no unstaged changes in your Git repository. Ensure that you have made changes before running the command.

Stackspot API Error

If there is an issue with the Stackspot API (e.g., invalid credentials or a failed execution), you will receive an error message. Make sure your Stackspot credentials are correct and try again.

Contributing

Contributions are welcome! If you find a bug or have a feature request, feel free to open an issue or submit a pull request.

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

stackspot_commit_helper-0.1.9.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stackspot_commit_helper-0.1.9-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file stackspot_commit_helper-0.1.9.tar.gz.

File metadata

  • Download URL: stackspot_commit_helper-0.1.9.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for stackspot_commit_helper-0.1.9.tar.gz
Algorithm Hash digest
SHA256 af107f1e190413dc029d607a97a60f51858e39c8e3cbe3afc9fe65335949cc4c
MD5 261abed01db9a7ed1cd9c94f964ecb75
BLAKE2b-256 e2f4c3d3750efd608eafc3c35407e23f59b6c5249f94c3c6ee3b7aec75b74572

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackspot_commit_helper-0.1.9.tar.gz:

Publisher: python-publish.yml on engeziellithonzup/stackspot-commit-helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stackspot_commit_helper-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for stackspot_commit_helper-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 549b352e0afe13392ea4034d513853fe7d47a4d7e598fd6ae511e1a8afc4945d
MD5 de739941f6cf2db3617d55b905296106
BLAKE2b-256 584f91ed74b17b2dfc2b9b0aa178848a87c6f9804027523fe90ae46daca2d6da

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackspot_commit_helper-0.1.9-py3-none-any.whl:

Publisher: python-publish.yml on engeziellithonzup/stackspot-commit-helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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