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

PR list in changes summary is wrong if a release is not from the main branch #100

Closed
javierggt opened this issue Aug 23, 2023 · 0 comments · Fixed by #98
Closed

PR list in changes summary is wrong if a release is not from the main branch #100

javierggt opened this issue Aug 23, 2023 · 0 comments · Fixed by #98

Comments

@javierggt
Copy link
Collaborator

javierggt commented Aug 23, 2023

The example case is starcheck, which has release 4.2.1 from a branch. Inspecting the tree, one can see that the merges for the last three releases are:

  • 14.3.0: 425, 429, 423, 420, 411,
  • 14.2.1: 421,
  • 14.1.0: 419, 418, 416, 413, 412, 408

Using the current master and this lines of code

from skare3_tools import packages, github
from skare3_tools.github.scripts import release_merge_info
repo_info = packages.get_repository_info('sot/starcheck', update=True, since=10)
release_info = {r['release_tag']: r for r in repo_info['release_info']}
sha = dict([(r['release_tag'], r['release_sha']) for r in list(release_info.values())[1:]])
print([pr['pr_number'] for pr in release_info['14.3.0']['merges']])
print([pr['pr_number'] for pr in release_info['14.2.1']['merges']])
print([pr['pr_number'] for pr in release_info['14.1.0']['merges']])

we get

[425, 429, 423, 420, 411]
[]
[419, 412, 418, 413, 416, 408]

Using release_merge_info we get a different wrong answer

  • 14.3.0: 425, 429, 423
  • 14.2.1: 420, 411
  • 14.1.0: 419, 418, 416, 413, 412, 408
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 a pull request may close this issue.

1 participant