mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
release script shows PRs that did not get included in changelog
This commit is contained in:
parent
be90ec51e4
commit
1314f75219
1 changed files with 22 additions and 11 deletions
|
@ -19,7 +19,8 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
AREA_RENAME = {
|
AREA_RENAME = {
|
||||||
'api': 'API'
|
'api': 'API',
|
||||||
|
'dht': 'DHT'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,17 +152,22 @@ def release(args):
|
||||||
|
|
||||||
incompats = []
|
incompats = []
|
||||||
release_texts = []
|
release_texts = []
|
||||||
|
unlabeled = []
|
||||||
areas = {}
|
areas = {}
|
||||||
for pr in gh.search_issues(f"merged:>={previous_release._json_data['created_at']} repo:lbryio/lbry"):
|
for pr in gh.search_issues(f"merged:>={previous_release._json_data['created_at']} repo:lbryio/lbry"):
|
||||||
for area_name in get_labels(pr, 'area'):
|
area_labels = list(get_labels(pr, 'area'))
|
||||||
area = areas.setdefault(area_name, [])
|
type_label = get_label(pr, 'type')
|
||||||
type_label = get_label(pr, "type")
|
if area_labels and type_label:
|
||||||
for incompat in get_backwards_incompatible(pr.body):
|
for area_name in area_labels:
|
||||||
incompats.append(f' * [{area_name}] {incompat.strip()} ({pr.html_url})')
|
for incompat in get_backwards_incompatible(pr.body):
|
||||||
for release_text in get_release_text(pr.body):
|
incompats.append(f' * [{area_name}] {incompat.strip()} ({pr.html_url})')
|
||||||
release_texts.append(f'{release_text.strip()} ({pr.html_url})')
|
for release_text in get_release_text(pr.body):
|
||||||
if not (args.action == '*-rc' and type_label == 'fixup'):
|
release_texts.append(f'{release_text.strip()} ({pr.html_url})')
|
||||||
area.append(f' * [{type_label}] {pr.title} ({pr.html_url}) by {pr.user["login"]}')
|
if not (args.action == '*-rc' and type_label == 'fixup'):
|
||||||
|
area = areas.setdefault(area_name, [])
|
||||||
|
area.append(f' * [{type_label}] {pr.title} ({pr.html_url}) by {pr.user["login"]}')
|
||||||
|
else:
|
||||||
|
unlabeled.append(f' * {pr.title} ({pr.html_url}) by {pr.user["login"]}')
|
||||||
|
|
||||||
area_names = list(areas.keys())
|
area_names = list(areas.keys())
|
||||||
area_names.sort()
|
area_names.sort()
|
||||||
|
@ -182,7 +188,7 @@ def release(args):
|
||||||
w(incompat)
|
w(incompat)
|
||||||
for area in area_names:
|
for area in area_names:
|
||||||
prs = areas[area]
|
prs = areas[area]
|
||||||
area = AREA_RENAME.get(area, area.capitalize())
|
area = AREA_RENAME.get(area.lower(), area.capitalize())
|
||||||
w('')
|
w('')
|
||||||
w(f'### {area}')
|
w(f'### {area}')
|
||||||
for pr in prs:
|
for pr in prs:
|
||||||
|
@ -190,6 +196,11 @@ def release(args):
|
||||||
|
|
||||||
print(body.getvalue())
|
print(body.getvalue())
|
||||||
|
|
||||||
|
if unlabeled:
|
||||||
|
print('The following PRs were skipped and not included in changelog:')
|
||||||
|
for skipped in unlabeled:
|
||||||
|
print(skipped)
|
||||||
|
|
||||||
if not args.dry_run:
|
if not args.dry_run:
|
||||||
|
|
||||||
commit = version_file.update(
|
commit = version_file.update(
|
||||||
|
|
Loading…
Add table
Reference in a new issue