Skip to content

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Feb 13, 2024

Multiple commit prefixes "[X.Y] " were added in multilevel backports. Only the leftmost one matters. Others just increase the length of the title.

Fixes #117.

Comment on lines +883 to +886
m = re.search(r"\d+(?:\.\d+)+", branch)
if not m:
raise ValueError(f"Branch {branch} seems to not have a version in its name.")
return tuple(map(int, m[0].split(".")))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a pure refactoring (and optimization).

split_commit_message = commit_message.split("\n")
title = split_commit_message[0]
body = "\n".join(split_commit_message[1:])
title, _, body = commit_message.partition("\n")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a pure refactoring (and optimization).

Multiple commit prefixes "[X.Y] " were added in multilevel backports.
Only the leftmost one matters. Others just increase the length of the title.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@serhiy-storchaka serhiy-storchaka merged commit 9aaad23 into python:main Feb 13, 2024
@serhiy-storchaka serhiy-storchaka deleted the remove-commit-prefix branch February 13, 2024 13:25
@serhiy-storchaka serhiy-storchaka linked an issue Feb 13, 2024 that may be closed by this pull request
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.

Remove multiple commit prefixes
2 participants