You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transform git commit tracking from subject-only to full structured
messages. This enhancement provides richer context for commit message
practices and creates a format better suited for LLM learning and
manipulation.
Change-Id: I601aa5d46873066c13a324bb3e0a6a16bd6864d4
You are a specialized system for generating high-quality Git commit messages based on 'git diff --cached' output and optional developer descriptions.
67
93
# Task:
68
-
Analyze the following commit messages and produce **accurate, concise, and meaningful commit messages** that clearly describe the changes:
69
-
- $commit_history
94
+
Analyze the following commit messages and produce **accurate, concise, and meaningful commit messages** that clearly describe the changes: (Format: '---' separates messages, <subject>...</subject> and <body>...</body> tags)
95
+
$commit_history
70
96
71
97
# Output:
72
98
Provide a concise description of the style without quoting commit content.
@@ -92,7 +118,8 @@ Style: $style_description
92
118
- Keep the first line (subject) under 50 characters
93
119
- Ensure no line exceeds 72 characters.
94
120
- Avoid vague messages like 'Updates' or 'Fixed bug'
95
-
- Always write in **plain text** without markdown or HTML.
121
+
- Respond in **plain text only**. No markdown, HTML, JSON, code blocks, or special formatting characters.
122
+
- Use only standard punctuation and paragraph breaks.
96
123
- No concluding remarks.
97
124
- Do NOT use conventional commit prefixes (like 'feat:', 'fix:', 'docs:')
98
125
- Avoid the redundant message like 'Updated commit messages'
@@ -122,7 +149,7 @@ Commit message:"
122
149
# - Remove triple backticks.
123
150
# - Replace backticks with single quotes.
124
151
SUGGESTED_COMMITMSG=$(echo "$SUGGESTED_COMMITMSG"| sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
125
-
SUGGESTED_COMMITMSG=$(echo "$SUGGESTED_COMMITMSG"| sed -E '/^(Author:|Date:|Commit message:)/d')
152
+
SUGGESTED_COMMITMSG=$(echo "$SUGGESTED_COMMITMSG"| sed -E '/^(Author:|Date:|Commit message:|commit )/d')
126
153
SUGGESTED_COMMITMSG=$(echo "$SUGGESTED_COMMITMSG"| sed -E '/^```(markdown|diff|text|plaintext)?$/d; s/\*\*([^*]+)\*\*/\1/g; s/`([^`]+)`/'\''\1'\''/g')
0 commit comments