Skip to content

Commit

Permalink
Update scripts/release_scripts/increment_version.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
SafetyQuincyF and coderabbitai[bot] authored Oct 23, 2024
1 parent 66aab6a commit ec55cf2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/release_scripts/increment_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ def format_commit_message(commit_message: str) -> str:
)
return f"- {commit_message}"
else:
return f"- fix: {commit_message}"

# Extract common commit types or use "other" as default
commit_types = ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore']
for type_ in commit_types:
if commit_message.startswith(f"{type_}:"):
return f"- {commit_message}"
return f"- other: {commit_message}"

def update_changelog(file_path: str, new_version: str, new_commits: str):
"""Add new version and commits to the changelog file in the correct section."""
Expand Down

0 comments on commit ec55cf2

Please sign in to comment.