I would gladly submit a PR as well, but it's not entirely clear what cases the function is meant to cover. A small test suite would be beneficial here. I suppose I could create one from the large pool of version numbers already being handled by the tool.
Hi @qchateau and thank you for creating this incredibly useful tool.
It looks like the
_fix_version()
function has an edge case that is not being handled correctly: a0.7b1
release gets incorrectly transformed into0.7
.I unfortunately did not catch that when merging that version into CCI, leading to https://github.com/conan-io/conan-center-index/issues/22071.
I traced the issue down to this regex replacement: https://github.com/qchateau/conan-center-bot/blob/bc403d90062c5c936077ec7b8e9ffa7759cf3fe3/ccb/version.py#L7 https://github.com/qchateau/conan-center-bot/blob/bc403d90062c5c936077ec7b8e9ffa7759cf3fe3/ccb/version.py#L94-L96
I would gladly submit a PR as well, but it's not entirely clear what cases the function is meant to cover. A small test suite would be beneficial here. I suppose I could create one from the large pool of version numbers already being handled by the tool.