Skip to content

feat(build): add a change log generator#2832

Draft
smailio wants to merge 11 commits intodevfrom
feat/changelog-generator
Draft

feat(build): add a change log generator#2832
smailio wants to merge 11 commits intodevfrom
feat/changelog-generator

Conversation

@smailio
Copy link
Collaborator

@smailio smailio commented Nov 3, 2025

Unfortunately this is not 100% iso with the process release.

To generate the list of change I rely in the commits. Our standard so far is to use pull requets titles. Most of the the time it's identical but not always. I'm not sure how important it is to use the pull request title, maybe the commit message is enough ?

You can still use this script, you'll just need to update the sscript by hard coding the list of change instead of retrieving them dynamically.

To do so rewrite get_commits_for_release()so it returns the lines you got after drafting a new release.

@smailio smailio requested a review from Copilot November 3, 2025 16:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds automated changelog generation functionality to the version update script. The script now generates changelog entries from git commits using conventional commit format and automatically inserts them into the CHANGELOG.md file during version updates.

Key changes:

  • New generate_changelog.py script that parses git commits between branches and formats them as changelog entries
  • Integration of changelog generation into the update_version.py workflow
  • New ChangeLogContent token class to handle generated changelog text insertion

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
scripts/generate_changelog.py New script that fetches git commits, parses conventional commit messages, and generates formatted changelog entries with PR links
scripts/update_version.py Integrates changelog generation by importing the new module, adding ChangeLogContent token class, and passing generated content to update_changelog function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


def fetch_branches():
"""Fetch the latest changes from origin for master and dev branches."""
subprocess.run(["git", "fetch", "origin", "master", "dev"], capture_output=True, check=True)
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to run_git(), this subprocess call with check=True will raise a generic CalledProcessError on failure. Consider adding error handling or a descriptive message for when the fetch operation fails.

Suggested change
subprocess.run(["git", "fetch", "origin", "master", "dev"], capture_output=True, check=True)
try:
subprocess.run(["git", "fetch", "origin", "master", "dev"], capture_output=True, check=True)
except subprocess.CalledProcessError as e:
print("Error: Failed to fetch branches 'master' and 'dev' from 'origin'.")
print("Git output:")
print(e.stderr.decode() if hasattr(e.stderr, "decode") else e.stderr)
print("Please check your network connection, remote repository URL, and authentication.")
raise

Copilot uses AI. Check for mistakes.
return "No changes to report."

changes_by_category = parse_changes(release_commits_list)
return mk_changelog_str(changes_by_category)
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If parse_changes() returns an empty dictionary (e.g., when commits don't follow conventional commit format), mk_changelog_str() will return an empty string instead of a meaningful message. This could result in inserting blank content into the changelog.

Copilot uses AI. Check for mistakes.
@TheoPascoli
Copy link
Contributor

I wonder if we can just use a llm and ask him to collect all the commits from last release, and format it. We should try it

@TheoPascoli TheoPascoli force-pushed the dev branch 2 times, most recently from b96b4f5 to 86503ca Compare February 20, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants