-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitAuto: [FEATURE] Preserve original message for merge conflict resolutions #114
base: main
Are you sure you want to change the base?
GitAuto: [FEATURE] Preserve original message for merge conflict resolutions #114
Conversation
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Here's the code health analysis summary for commits Analysis Summary
|
Committed the Check Run |
Committed the Check Run |
Committed the Check Run |
Committed the Check Run |
Committed the Check Run |
Committed the Check Run |
Committed the Check Run |
Infisical secrets check: ✅ No secrets leaked! 💻 Scan logs4:57AM INF scanning for exposed secrets...
4:57AM INF 110 commits scanned.
4:57AM INF scan completed in 84.3ms
4:57AM INF no leaks found
|
Resolves #113
What is the feature
Implement functionality in the
dotnet-aicommitmessage
tool to preserve original commit messages that follow the auto-generated format used during merge conflict resolutions.Why we need the feature
Currently, the tool replaces all commit messages generated via the ChatGPT API (LLM models), which can inadvertently modify the intended context of merge conflict resolutions. Preserving the original messages ensures a clear and accurate version history, maintaining the context and intent behind merge conflict resolutions.
How to implement and why
Pattern Detection: Utilize C# regular expressions to detect if a commit message matches the predefined auto-generated pattern for merge conflict resolutions.
Bypass API Generation: If a commit message matches the merge conflict resolution pattern, bypass the ChatGPT API and retain the original message.
Integration: Modify the existing commit message processing workflow to include the detection step before deciding whether to generate a new message or preserve the original.
Unit Testing: Add comprehensive unit tests to verify the correct detection of merge conflict resolution patterns and ensure that messages are preserved or processed as intended based on their pattern.
This step-by-step approach ensures that only relevant messages are preserved while others continue to leverage the AI-powered commit message generation.
About backward compatibility
This feature introduces new pattern detection logic without altering the existing commit message generation workflows for messages that do not match the merge conflict pattern. Therefore, existing functionality remains unaffected, ensuring backward compatibility.
Test these changes locally