mirror of https://github.com/zcash/developers.git
Render each Zashi-related release that a given feature is blocking.
This commit is contained in:
parent
a666c1ad76
commit
ffe262ff3d
|
@ -25,11 +25,37 @@ REPOS = {
|
||||||
**github.WALLET_REPOS,
|
**github.WALLET_REPOS,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RELEASE_MATRIX = {
|
||||||
|
RUST: [ANDROID_SDK, SWIFT_SDK],
|
||||||
|
ANDROID_SDK: [ZASHI_ANDROID],
|
||||||
|
SWIFT_SDK: [ZASHI_IOS],
|
||||||
|
ZASHI_ANDROID: [],
|
||||||
|
ZASHI_IOS: []
|
||||||
|
}
|
||||||
|
|
||||||
class TrackedIssue:
|
class TrackedIssue:
|
||||||
def __init__(self, issue):
|
def __init__(self, issue):
|
||||||
self.issue = issue
|
self.issue = issue
|
||||||
|
|
||||||
|
def build_release_matrix_from(dg, issue, repo_id):
|
||||||
|
acc = []
|
||||||
|
for child in dg.neighbors(issue):
|
||||||
|
if child.repo_id == repo_id and 'C-release' in child.labels:
|
||||||
|
child_releases = []
|
||||||
|
for dep_repo in RELEASE_MATRIX.get(repo_id):
|
||||||
|
child_releases.extend(build_release_matrix_from(dg, child, dep_repo))
|
||||||
|
|
||||||
|
if len(child_releases) > 0:
|
||||||
|
for rec in child_releases:
|
||||||
|
rec[repo_id] = child
|
||||||
|
else:
|
||||||
|
child_releases = [{repo_id: child}]
|
||||||
|
|
||||||
|
acc.extend(child_releases)
|
||||||
|
else:
|
||||||
|
acc.extend(build_release_matrix_from(dg, child, repo_id))
|
||||||
|
|
||||||
|
return acc
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
gapi = github.api(GITHUB_TOKEN)
|
gapi = github.api(GITHUB_TOKEN)
|
||||||
|
@ -166,23 +192,27 @@ def main():
|
||||||
f.write(html_header)
|
f.write(html_header)
|
||||||
|
|
||||||
for issue in tracked_issues.values():
|
for issue in tracked_issues.values():
|
||||||
f.write('<tr>')
|
rows = build_release_matrix_from(dg, issue, RUST);
|
||||||
|
for row in rows:
|
||||||
|
f.write('<tr>')
|
||||||
|
|
||||||
if 'C-tracked-bug' in issue.labels:
|
if 'C-tracked-bug' in issue.labels:
|
||||||
f.write('<td>🐞</td>')
|
f.write('<td>🐞</td>')
|
||||||
else:
|
else:
|
||||||
f.write('<td>💡</td>')
|
f.write('<td>💡</td>')
|
||||||
|
|
||||||
f.write('<td>{} <a href="{}">{}</a></td>'.format(
|
f.write('<td>{} <a href="{}">{}</a></td>'.format(
|
||||||
'✅' if issue.state == 'closed' else '🛑',
|
'✅' if issue.state == 'closed' else '🛑',
|
||||||
issue.url,
|
issue.url,
|
||||||
issue.title,
|
issue.title,
|
||||||
))
|
))
|
||||||
|
|
||||||
children = nx.descendants(dg, issue)
|
for repo_id in [RUST, ANDROID_SDK, SWIFT_SDK, ZASHI_ANDROID, ZASHI_IOS]:
|
||||||
def find_child_release(repo_id):
|
child = row.get(repo_id)
|
||||||
for child in children:
|
if child is None:
|
||||||
if child.repo_id == repo_id and 'C-release' in child.labels:
|
# Release not found in this repo
|
||||||
|
f.write('<td>📥</td>')
|
||||||
|
else:
|
||||||
# Extract version number from title
|
# Extract version number from title
|
||||||
if repo_id == RUST:
|
if repo_id == RUST:
|
||||||
version = re.search(r'zcash_[^ ]+ \d+(\.\d+)+', child.title).group()
|
version = re.search(r'zcash_[^ ]+ \d+(\.\d+)+', child.title).group()
|
||||||
|
@ -194,18 +224,7 @@ def main():
|
||||||
child.url,
|
child.url,
|
||||||
version,
|
version,
|
||||||
))
|
))
|
||||||
return
|
f.write('</tr>')
|
||||||
|
|
||||||
# Release not found in this repo
|
|
||||||
f.write('<td>📥</td>')
|
|
||||||
|
|
||||||
find_child_release(RUST)
|
|
||||||
find_child_release(ANDROID_SDK)
|
|
||||||
find_child_release(SWIFT_SDK)
|
|
||||||
find_child_release(ZASHI_ANDROID)
|
|
||||||
find_child_release(ZASHI_IOS)
|
|
||||||
|
|
||||||
f.write('</tr>')
|
|
||||||
|
|
||||||
f.write(html_footer)
|
f.write(html_footer)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue