Merged
Conversation
Added a new `check_git_status()` function to verify if there are changes staged for commit in the Git repository. The function runs `git status` command and checks if the output contains the "no changes added to commit" message. If there are no staged changes, the `run_magic_commit()` function returns a warning message to prompt the user to stage some changes before running `magic-commit`. This enhancement ensures that the `magic-commit` script is only executed when there are changes ready to be committed, preventing accidental commits without any changes. Modified Files: - `magic_commit/magic_commit.py`: Added `check_git_status()` function. - `requirements.txt`: Added new package `docutils` (version 0.20.1). Closes #21
Revised the installation instructions in the README.md file to include the proper command for installing the package via PyPI. Changed the previous instruction for installing the package using Homebrew on Mac to a universal instruction for all platforms, using `pip install magic-commit`. Also added the link to the PyPI page for the package for more information. This change improves the clarity and accuracy of the installation instructions for users.
Updated the version number in the `setup.py` file from 0.4.0 to 0.5.0.
Modified the `run_magic_commit()` function in `magic_commit.py` to include the `start` and `ticket` arguments. These arguments are used as inputs to the `generate_commit_message()` function, allowing the user to provide the start of the commit message and link a GitHub issue in the generated commit message. This enhancement provides more flexibility and customization options for the generated commit message. Changes: - Added `start` and `ticket` arguments to the `run_magic_commit()` function signature. - Passed the `start` and `ticket` arguments to the `generate_commit_message()` function. Example usage: ``` python -m magic_commit --start "Refactor code" --ticket 1234 ``` This command will generate a commit message that starts with "Refactor code" and includes a link to GitHub issue #1234. Note: The `start` argument and the `ticket` argument are optional. If not provided, the commit message will be generated without a specific start or ticket. Closes #6 and #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#6, #19, #21