sot/skare3_tools

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

Closed this issue · 0 comments

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