Skip to content

Refine aicommit with iterative subject Shortening #241

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

Merged
merged 1 commit into from
Mar 8, 2025

Conversation

yenslife
Copy link
Contributor

@yenslife yenslife commented Mar 7, 2025

Two-Stage Commit Message Generation:
First, generate a detailed commit description.
Then, refine the subject line for conciseness and clarity.

If the initial subject exceeds 50 characters, the script regenerates it with explicit length constraints. Up to 10 iterations ensure compliance with Git conventions. If still too long, a warning prompts users for manual adjustments.

This commit also improved LLM instructions for better adherence to commit message best practices. Clear separation of Subject Line and Body with enforced constraints.

Set SHOW_AI_COMMIT_PROMPT to see full prompt.
Set TEMPERATURE to change model temperature.

Change-Id: I6b9c1337210b86a400e84c3984c17dcdc72fb26e

Two-Stage Commit Message Generation:
First, generate a detailed commit description.
Then, refine the subject line for conciseness and clarity.

If the initial subject exceeds 50 characters, the script regenerates it
with explicit length constraints. Up to 10 iterations ensure compliance
with Git conventions. If still too long, a warning prompts users for
manual adjustments.

This commit also improved LLM instructions for better adherence to
commit message best practices. Clear separation of Subject Line and
Body with enforced constraints.

Set SHOW_AI_COMMIT_PROMPT to see full prompt.
Set TEMPERATURE to change model temperature.

Change-Id: I6b9c1337210b86a400e84c3984c17dcdc72fb26e
@jserv jserv merged commit 742d822 into sysprog21:aicommit Mar 8, 2025
1 of 2 checks passed
@jserv
Copy link
Contributor

jserv commented Mar 8, 2025

Thank @yenslife for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants