Skip to content

Commit 646cbef

Browse files
committed
Limit PR analysis to dev PRs (to main).
1 parent 7559676 commit 646cbef

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

site/numpy_timeseries.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,21 +258,23 @@ tags: [hide-input]
258258
259259
with 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

265270
A 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
---
272274
tags: [hide-input]
273275
---
274-
# All contributors
275276
277+
# All contributors
276278
merged_prs = [pr for pr in prs if pr['state'] == 'MERGED']
277279
merge_dates = np.array([pr['mergedAt'] for pr in merged_prs], dtype=np.datetime64)
278280
binsize = np.timedelta64(30, "D")
@@ -364,3 +366,12 @@ ax.set_ylabel(r"# of conflicting PRs")
364366
fig.autofmt_xdate()
365367
fig.tight_layout();
366368
```
369+
370+
### Number of PR participants
371+
372+
```{code-cell} ipython3
373+
---
374+
tags: [hide-input]
375+
---
376+
377+

0 commit comments

Comments
 (0)