-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgh_issues_analysis.Rmd
More file actions
50 lines (42 loc) · 1.13 KB
/
gh_issues_analysis.Rmd
File metadata and controls
50 lines (42 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: "Analyze GH issues"
author: "Rose Hartman"
date: '2023-09-06'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(gh)
library(purrr)
```
```{r}
issues <- gh("/repos/arcus/education_modules/issues", .limit = Inf)
```
```{r}
iss_df <-
tibble::tibble(
issue_id = issues |> purrr::map_int("id"),
issue = issues |> purrr::map_chr("title"),
state = issues |> purrr::map_chr("state"),
issue_number = issues |> purrr::map_int("number"),
labels = issues |> purrr::map("labels"),
pr = issues |> purrr::map(\(x) pluck_exists(x, "pull_request"))
) |>
# exclude pull requests
dplyr::filter(pr == FALSE) |>
# get info about each label
tidyr::unnest_longer(labels) |>
tidyr::hoist(labels,
label = "name",
color = "color") |>
dplyr::mutate(label_type = ifelse(color == "44AA99", "module", "other")) |>
# drop unneeded columns
dplyr::select(-pr, -labels, -color)
```
How many open issues per module?
```{r}
iss_df |>
dplyr::filter(label_type == "module") |>
dplyr::count(label) |>
dplyr::arrange(desc(n))
```