Commitment Issues
Project description
Commitment Issues
Commitment Issues is a Command Line Interface (CLI) tool designed to simplify and enhance the creation of Git commit messages. It offers developers the ability to generate messages using customizable templates, accommodating both straightforward and detailed message styles. With features for regenerating and editing commit messages, Commitment Issues provides flexibility for refining messages as needed. This tool helps ensure that commit messages are consistent and informative, improving code communication and saving valuable development time.
Why Use Commitment Issues?
Commitment Issues takes the hassle out of writing commit messages, making them clear, informative, and meaningful—without all the extra effort. Developers often overlook the impact of a well-written commit message, leading to vague or even cryptic notes that don't communicate the true value of code changes. Commitment Issues solves this by simplifying the process: just run a single command, and voilà, you're done! Plus, if you prefer a personalized touch, you can easily customize generated messages to fit your style, saving you from starting from scratch and only having to write minor tweaks. Make your commits better with Commitment Issues; your team will thank you!
Installation
pip install ComIss
Setup
-
Create a
.envFile:In the project root, create a file named
.env:touch .env -
Add Your OpenAI API Key:
Open
.envand add:OPENAI_API_KEY=your_openai_api_key_hereReplace
your_openai_api_key_herewith your actual OpenAI API key.Note: The
.gitignoreincludes.envto keep your API key private.
Usage
Regular Workflow
-
Make Code Changes:
Develop your code as usual.
-
Stage Changes:
git add . -
Generate and Commit Message:
-
Using Default Template (Simple):
Simply run the
commitcommand without specifying the template. This uses the defaultsimpletemplate.ComIss commitWhat Happens:
- Generates a commit message using the
simpletemplate (token limit: 500). - Displays the generated commit message.
- Prompts for action: accept, regenerate, edit, or quit.
- Generates a commit message using the
-
Specifying Template Complexity:
Choose between
simpleandcomplextemplates by using the-mor--templateflag after thecommitsubcommand.ComIss commit -m cOptions:
-m,--template: Select the commit message template complexity.c: Provides a complex commit message.s: Provides a simple commit message. (Default)
Example:
ComIss commit -m s
-
-
Check Message:
After generating the commit message, you will see four options:
Generated commit message: <changetype> | <impact area>: message Do you want to (a)ccept this message, (r)egenerate, (e)dit, or (q)uit?- Accept (a): Automatically commits the changes with the generated message.
- Regenerate (r): Generates a new message and shows suggestions.
- Edit (e): Opens an editor to write your own message.
- Quit (q): Exits without committing.
-
Push Changes:
After committing, push your changes to the remote repository as usual.
git push
Additional Commands
-
Filter Commit History:
ComIss filter -c bugfix -i backendOptions:
-c,--change-type: Filter commits by change type (e.g., feature, bugfix).-i,--impact-type: Filter commits by impact area (e.g., frontend, backend).
-
Reformat Commit History:
The Reformat Commit History feature allows you to update previous commit messages to align with Commitment Issues' current structured format. This feature aims to help maintain a consistent and informative commit history.
Features
-
Reformat All: Updates all commit messages in your directory to the Commitment Issues' structured format.
ComIss retro
Important Notes
-
Backup Your Repository: Rewriting commit history can have significant effects, especially for shared or public repositories. Ensure you have backups before performing any reformatting operations.
-
Collaborator Coordination: If you're working in a team, inform all collaborators before rewriting history to avoid discrepancies in their local repositories.
-
Immutable History: Altering commit history changes commit hashes, which may lead to discrepancies if not managed carefully.
-
Pushing to Remote Repository: If you plan to push a rebase back to the remote repository, you need write access.
-
-
View Help:
To see all available commands and options, use the
--helpflag.ComIss --helpExample Output:
usage: ComIss [-h] {commit,filter,retro} ... CLI tool to generate and manage commit messages. positional arguments: {commit,filter,retro} Commands commit Generate and commit a message. filter Filter commit history. retro Reformat commit history. options: -h, --help show this help message and exit
Reporting a Bug
Users are welcome to submit a Git Issue when encountering a new bug that is not already listed as a Known Bug (more info below). We require that the content of the Git Issue adhere to the information requested in the template located in .github/ISSUE_TEMPLATE/bug-report-template.md. When creating a new Git Issue, there is an option to import the template directly into the text box for ease of use. The user should assign the label bug to further indicate this Git Issue as bug-related.
As soon as this Git Issue is submitted, it will be assigned the unresolved and pending review labels by default to communicate that it is an open bug that is pending verification from the development team. Once the issue has been verified as a valid bug (by reviewing the contents of the Git Issue), a member of the team will remove the pending review label and clarify its unresolved status by tagging it unresolved. The next step for developers is to tag the open issue with in progress to indicate that they have claimed responsibility to resolve that bug. Once a developer resolves the bug, the in progress and unresolved labels will be replaced with resolved to indicate that the bug has been fixed.
Known Bugs
A list of Known Bugs can be found by filtering the Git Issues by the bug label. More specifically, the in progress label can be added as a filter to show all bugs that are still unresolved and in progress of being fixed. A list of resolved bugs can be found by filtering by bug and resolved.
Notes
- Environment Security: Ensure
.envis not committed to your repository to protect your API keys. - OpenAI Version: Use
openai==0.28as newer versions may lack required features. - Argument Placement: Flags are now subcommand-specific and should be placed after the respective subcommand.
- Manual Git Commands: Users are still responsible to manually
addandpushtheir code changes via Git. Commitment Issues only assists in the middle step of committing the changes.
By introducing the Reformat Commit History feature, Commitment Issues aims to help you maintain a clean and consistent commit history, enhancing the clarity and professionalism of your project's version control. Stay tuned for updates as we continue to enhance this functionality!
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file comiss-0.1.3.tar.gz.
File metadata
- Download URL: comiss-0.1.3.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc8b658196bb3840ce8a68337cadb455f0b7edba9344eec0cfb1fe73894db7c
|
|
| MD5 |
f85f7a628a4fb2040e137af17a5f6209
|
|
| BLAKE2b-256 |
fee2fc1edf4819c56ba53be4ca6a80b3ac6cd888b90dc2a3f7f0e70ff256bb27
|
File details
Details for the file ComIss-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ComIss-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8d0bf08b96bcf9c31a11fbf4c8354903fec211f37744822d4b754c91b550aa6
|
|
| MD5 |
d1369bd8fc8da63b5a9cc600d8fc69bd
|
|
| BLAKE2b-256 |
7e12661d4bd229031358a76184bab3abb1ceb3ad5c63112e2122b476264866b4
|