interplane.Get Omega
Read in your language

hive-not-swarm

aien-dev/hive-not-swarm

Brought by drakestapleton

branch master Branches Tags History

hive-not-swarm / sources / count_pr_links.py

15 lines · 774 bytes Raw Blame History
1"""Recount the Section 4.1 pull-request link counts from sources/repository_pr_links.json."""
2import json
3from pathlib import Path
4
5data = json.loads((Path(__file__).resolve().parent / 'repository_pr_links.json').read_text())
6CUT = '2026-10-12T00:00:00Z'
7for label, keep in (('before', lambda t: t < CUT), ('on_or_after', lambda t: t >= CUT)):
8 prs = [p for p in data['pull_requests'] if keep(p['createdAt'])]
9 states = {}
10 for p in prs:
11 states[p['state']] = states.get(p['state'], 0) + 1
12 print(label, 'pull_requests', len(prs),
13 'formal_closing_link', sum(p['formal_closing_link'] for p in prs),
14 'issue_number_in_title_or_body', sum(p['issue_number_in_title_or_body'] for p in prs),
15 'states', dict(sorted(states.items())))