Fix commit message truncation and enable auto-execution for /git:commit#24
Merged
Merged
Conversation
Update the /git:commit command to automatically execute the git commit command after generating a conventional commit message. This improves efficiency by eliminating the need for manual command execution. - Update description and task to reflect automatic execution - Add strict constraints against double quotes in subject and body to ensure shell safety - Remove the manual command execution output block
Update the README to clarify that the extension avoids both backticks and 'double quotes'. This documentation change aligns with the recent logic updates intended to prevent shell command truncation and potential execution errors in the CLI.
There was a problem hiding this comment.
Code Review
This pull request updates the git commit command to automatically execute commits and introduces stricter safety constraints by prohibiting double quotes in commit messages. Feedback suggests restoring the closing tag to maintain XML structure and re-including the instruction for a blank line between the subject and body to ensure compliance with the Conventional Commits specification.
Ensure that commit messages generated by the tool follow the Conventional Commits specification by explicitly instructing the model to separate the subject and body with a blank line. - Explicitly require blank line separation in body formatting - Fix template syntax by adding a missing closing tag
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.
Summary
This PR addresses two primary issues with the
/git:commitcommand that were degrading theuser experience and causing data loss in commit history.
the generated commit message. When the command was constructed as git commit -m
"...", the shell would treat the first internal double quote as the end of the
message, leading to truncated logs.
providing a text block for the user to copy-paste rather than executing the commit
directly.
How to Verify
/git:commitcommand.commit without asking you to copy-paste a command.
(e.g., by including a note like "referencing 'new' logic" in your changes). Check the
resulting
git logto ensure the message is not truncated and uses single quotes.Related Issues
Closes #23
Type of Change
Please select the type of change that applies to this PR:
Checklist
Screenshots/Video