CHANGELOG.md up to date is crucial, but it can be a tedious task. This recipe will show you how to use ChatCLI’s @git command to analyze your recent changes and generate a release notes proposal in seconds.
The Problem
After completing a series of commits for a new version, you need to summarize what was done. The manual process usually involves:- Running
git log --onelineto see the commits. - Analyzing each commit message.
- Grouping changes by type (New Features, Bug Fixes, etc.).
- Writing a summary in Markdown.
Ingredients
For this recipe, you will need:- To be in the root folder of a Git repository.
- To have some committed changes since the last tag/version.
Step by Step
Start ChatCLI and Use the @git Command
The
@git command automatically collects crucial information from your repository: the current branch, file status, diffs, and most importantly, recent commits.Let’s combine this with a clear prompt, instructing the AI on the format we want.Deconstructing the Prompt:
@git >: The command injects all Git context. The>operator separates the context from our instruction.- “Analyze the commits and changes…”: We ask the AI to not only read the commit messages but also correlate them with the code diffs provided.
- “generate a release notes proposal…”: We make the final goal clear.
- “Group the changes into sections…”: We give the AI a clear structure to follow, ensuring a consistent result.
Analyze and Refine the AI Response
ChatCLI will send the context to the AI, which will process the information and return a formatted response.Example AI Response: