Fix: Use Version.major
instead of .epoch
for git log
.
#48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #46
Summary
The previous versions of
qiskit-bot
used to throw exceptions whenever it generated changelogs for versions>= 1.0.0
. These commits aim to correct this behavior and generate the correct changelogs.Details
The root of this problem comes from the usage of
Version.epoch
instead ofVersion.major
whenever we refered to the major version ofQiskit
being released, this was more prominent when it came to minor and patch releases.Examples
Patch releases
With the old behavior, if a version
1.1.1
was submitted, the method_get_log_string()
would return1.1.1-0.1.0
based onf"{version_string}..{version_obj.epoch}.{version_obj.minor}.{version_obj.micro-1}"
The new behavior should return
1.1.1-1.1.0
.Minor releases
With the old behavior, if a version
1.2.0
was submitted, the method_get_log_string()
would return1.2.0-0.1.0
based onf"{version_string}..{version_obj.epoch}.{version_obj.minor-1}.0"
The new behavior should return
1.2.0-1.1.0
.