File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,21 +258,23 @@ tags: [hide-input]
258258
259259with open("../_data/prs.json", "r") as fh:
260260 prs = [item["node"] for item in json.loads(fh.read())]
261+
262+ # Only look at PRs to the main development branch - ignore backports, gh-pages,
263+ # etc.
264+ default_branches = {"main", "master"} # Account for default branch update
265+ prs = [pr for pr in prs if pr["baseRefName"] in default_branches]
261266```
262267
263268### Merged PRs over time
264269
265270A look at merged PRs over time.
266271
267- % TODO: This data includes backports - in the future, should limit to PRs merged
268- % into main only (query needs update).
269-
270272``` {code-cell} ipython3
271273---
272274tags: [hide-input]
273275---
274- # All contributors
275276
277+ # All contributors
276278merged_prs = [pr for pr in prs if pr['state'] == 'MERGED']
277279merge_dates = np.array([pr['mergedAt'] for pr in merged_prs], dtype=np.datetime64)
278280binsize = np.timedelta64(30, "D")
@@ -364,3 +366,12 @@ ax.set_ylabel(r"# of conflicting PRs")
364366fig.autofmt_xdate()
365367fig.tight_layout();
366368```
369+
370+ ### Number of PR participants
371+
372+ ``` {code-cell} ipython3
373+ ---
374+ tags: [hide-input]
375+ ---
376+
377+
You can’t perform that action at this time.
0 commit comments