Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use Version.major instead of .epoch for git log. #48

Merged
merged 6 commits into from
Jul 30, 2024

Conversation

raynelfss
Copy link
Contributor

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 of Version.major whenever we refered to the major version of Qiskit 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 return 1.1.1-0.1.0 based on

f"{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 return 1.2.0-0.1.0 based on

f"{version_string}..{version_obj.epoch}.{version_obj.minor-1}.0"

The new behavior should return 1.2.0-1.1.0.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Overall the fix lgtm, just one inline comment on the test organization.

tests/test_release_process.py Outdated Show resolved Hide resolved
- Comment some tests.
@mtreinish mtreinish changed the title FIx: Use Version.major instead of .epoch for git log. Fix: Use Version.major instead of .epoch for git log. Jul 30, 2024
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this.

@mtreinish mtreinish merged commit dbac6aa into Qiskit:master Jul 30, 2024
5 checks passed
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.

Changelog generation fails for versions >= 1.0.0
2 participants