Set connections to hosts.
Example workflow makes use of public GitHub and GitLab, but it is plausible, that you will use your internal git platforms, where you need to define
host
parameter. Seevignette("set_hosts")
article on that.
library(GitStats)
git_stats <- create_gitstats() %>%
set_github_host(
orgs = c("r-world-devs", "openpharma"),
token = Sys.getenv("GITHUB_PAT")
) %>%
set_gitlab_host(
orgs = c("mbtests"),
token = Sys.getenv("GITLAB_PAT_PUBLIC")
)
#> → Checking owners...
#> ✔ Set connection to GitHub.
#> → Checking owners...
#> ✔ Set connection to GitLab.
As scanning scope was set to organizations
(orgs
parameter in set_*_host()
),
GitStats
will pull all repositories from these
organizations.
repos <- get_repos(git_stats, progress = FALSE)
#> → [Host:GitHub][Engine:GraphQl][Scope:r-world-devs] Pulling repositories...
#> → [Host:GitHub][Engine:GraphQl][Scope:openpharma] Pulling repositories...
#> → [Host:GitHub][Engine:REST] Pulling contributors...
#> → [Host:GitLab][Engine:GraphQl][Scope:mbtests] Pulling repositories...
#> → [Host:GitLab][Engine:REST] Pulling contributors...
#> ✔ Data pulled in 26.9 secs
dplyr::glimpse(repos)
#> Rows: 90
#> Columns: 18
#> $ repo_id <chr> "R_kgDOHNMr2w", "R_kgDOHYNOFQ", "R_kgDOHYNrJw", "R_kg…
#> $ repo_name <chr> "shinyGizmo", "cohortBuilder", "shinyCohortBuilder", …
#> $ organization <chr> "r-world-devs", "r-world-devs", "r-world-devs", "r-wo…
#> $ fullname <chr> "r-world-devs/shinyGizmo", "r-world-devs/cohortBuilde…
#> $ platform <chr> "github", "github", "github", "github", "github", "gi…
#> $ repo_url <chr> "https://github.com/r-world-devs/shinyGizmo", "https:…
#> $ api_url <chr> "https://api.github.com/repos/r-world-devs/shinyGizmo…
#> $ created_at <dttm> 2022-04-20 10:04:32, 2022-05-22 18:31:55, 2022-05-22…
#> $ last_activity_at <dttm> 2024-07-12, 2025-04-11, 2025-04-16, 2024-06-13, 2025…
#> $ last_activity <drtn> 279.35 days, 6.35 days, 1.35 days, 308.35 days, 0.35…
#> $ default_branch <chr> "dev", "dev", "dev", "master", "master", "master", "m…
#> $ stars <int> 19, 8, 8, 0, 5, 3, 0, 2, 1, 0, 0, 0, 0, 1, 2, 4, 0, 1…
#> $ forks <int> 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 5,…
#> $ languages <chr> "R, CSS, JavaScript", "R", "R, CSS, JavaScript, SCSS"…
#> $ issues_open <int> 6, 38, 35, 3, 97, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 12, 0…
#> $ issues_closed <int> 12, 5, 13, 0, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, …
#> $ contributors <chr> "krystian8207, stla, galachad, stlagsk", "krystian820…
#> $ contributors_n <int> 4, 3, 3, 1, 4, 1, 6, 2, 1, 142, 2, 3, 1, 1, 1, 3, 25,…
You can always go for the lighter version of get_repos
,
i.e. get_repos_urls()
which will print you a vector of URLs
instead of whole table.
repos_urls <- get_repos_urls(git_stats)
#> → [Host:GitHub][Engine:REST][Scope:r-world-devs] Pulling repositories (URLs)...
#> → [Host:GitHub][Engine:REST][Scope:openpharma] Pulling repositories (URLs)...
#> → [Host:GitLab][Engine:REST][Scope:mbtests] Pulling repositories (URLs)...
#> ✔ Data pulled in 3.7 secs
dplyr::glimpse(repos_urls)
#> 'gitstats_repos_urls' chr [1:90] "https://api.github.com/repos/r-world-devs/shinyGizmo" ...
#> - attr(*, "type")= chr "api"
Verbose mode
If messages overwhelm you, you can switch them off in the function:
release_logs <- get_release_logs(
gitstats = git_stats,
since = "2024-01-01",
verbose = FALSE
)
dplyr::glimpse(release_logs)
#> Rows: 48
#> Columns: 7
#> $ repo_name <chr> "cohortBuilder", "shinyCohortBuilder", "shinyCohortBuilde…
#> $ repo_url <chr> "https://github.com/r-world-devs/cohortBuilder", "https:/…
#> $ release_name <chr> "cohortBuilder 0.3.0", "v0.3.1", "v0.3.0", "GitStats 2.3.…
#> $ release_tag <chr> "v0.3.0", "v0.3.1", "v0.3.0", "v2.3.0", "v2.2.2", "v2.2.1…
#> $ published_at <dttm> 2024-09-27 11:35:06, 2024-10-24 08:21:19, 2024-10-24 08:…
#> $ release_url <chr> "https://github.com/r-world-devs/cohortBuilder/releases/t…
#> $ release_log <chr> "* Add new filter of type `\"query\"` that allows to conf…
Or globally:
verbose_off(git_stats)
Cache
After pulling, the data is saved to GitStats
.
commits <- get_commits(
gitstats = git_stats,
since = "2024-06-01",
until = "2024-06-30",
progress = FALSE
)
#> → [Host:GitHub][Engine:GraphQl][Scope:r-world-devs] Pulling commits...
#> → [Host:GitHub][Engine:GraphQl][Scope:openpharma] Pulling commits...
#> → [Host:GitLab][Engine:REST][Scope:mbtests] Pulling commits...
#> ✔ Data pulled in 24.9 secs
dplyr::glimpse(commits)
#> Rows: 188
#> Columns: 11
#> $ id <chr> "C_kwDOHYNOFdoAKGU3Mjg5MTViZGM4YzYzMTIwOWEwMzEwMDIwOTA0…
#> $ committed_date <dttm> 2024-06-05 11:02:21, 2024-06-05 10:55:59, 2024-06-05 1…
#> $ author <chr> "Kamil Koziej", "Kamil Koziej", "Kamil Koziej", "Krysti…
#> $ author_login <chr> NA, NA, NA, "krystian8207", "krystian8207", "krystian82…
#> $ author_name <chr> "Kamil Koziej", "Kamil Koziej", "Kamil Koziej", "Krysti…
#> $ additions <int> 559, 0, 219, 1, 2, 108, 38, 83, 14, 1596, 973, 1292, 3,…
#> $ deletions <int> 304, 19, 87, 1, 1, 1, 0, 29, 0, 340, 163, 799, 6, 54, 1…
#> $ repository <chr> "cohortBuilder", "cohortBuilder", "cohortBuilder", "coh…
#> $ organization <chr> "r-world-devs", "r-world-devs", "r-world-devs", "r-worl…
#> $ repo_url <chr> "https://github.com/r-world-devs/cohortBuilder", "https…
#> $ api_url <glue> "https://api.github.com/graphql", "https://api.github.…
Caching feature is by default turned on. If you run the
get_*()
function once more, data will be retrieved from
GitStats
object.
commits <- get_commits(
gitstats = git_stats,
since = "2024-06-01",
until = "2024-06-30"
)
#> ! Retrieving commits from the GitStats storage.
#> ℹ If you wish to pull the data from API once more, set `cache` parameter to `FALSE`.
#> ✔ Data pulled in 0 secs
dplyr::glimpse(commits)
#> Rows: 188
#> Columns: 11
#> $ id <chr> "C_kwDOHYNOFdoAKGU3Mjg5MTViZGM4YzYzMTIwOWEwMzEwMDIwOTA0…
#> $ committed_date <dttm> 2024-06-05 11:02:21, 2024-06-05 10:55:59, 2024-06-05 1…
#> $ author <chr> "Kamil Koziej", "Kamil Koziej", "Kamil Koziej", "Krysti…
#> $ author_login <chr> NA, NA, NA, "krystian8207", "krystian8207", "krystian82…
#> $ author_name <chr> "Kamil Koziej", "Kamil Koziej", "Kamil Koziej", "Krysti…
#> $ additions <int> 559, 0, 219, 1, 2, 108, 38, 83, 14, 1596, 973, 1292, 3,…
#> $ deletions <int> 304, 19, 87, 1, 1, 1, 0, 29, 0, 340, 163, 799, 6, 54, 1…
#> $ repository <chr> "cohortBuilder", "cohortBuilder", "cohortBuilder", "coh…
#> $ organization <chr> "r-world-devs", "r-world-devs", "r-world-devs", "r-worl…
#> $ repo_url <chr> "https://github.com/r-world-devs/cohortBuilder", "https…
#> $ api_url <glue> "https://api.github.com/graphql", "https://api.github.…
Unless, you switch off the cache:
commits <- get_commits(
gitstats = git_stats,
since = "2024-06-01",
until = "2024-06-30",
cache = FALSE,
progress = FALSE
)
#> ℹ Cache set to FALSE, I will pull data from API.
#> → [Host:GitHub][Engine:GraphQl][Scope:r-world-devs] Pulling commits...
#> → [Host:GitHub][Engine:GraphQl][Scope:openpharma] Pulling commits...
#> → [Host:GitLab][Engine:REST][Scope:mbtests] Pulling commits...
#> ✔ Data pulled in 22.3 secs
dplyr::glimpse(commits)
#> Rows: 188
#> Columns: 11
#> $ id <chr> "C_kwDOHYNOFdoAKGU3Mjg5MTViZGM4YzYzMTIwOWEwMzEwMDIwOTA0…
#> $ committed_date <dttm> 2024-06-05 11:02:21, 2024-06-05 10:55:59, 2024-06-05 1…
#> $ author <chr> "Kamil Koziej", "Kamil Koziej", "Kamil Koziej", "Krysti…
#> $ author_login <chr> NA, NA, NA, "krystian8207", "krystian8207", "krystian82…
#> $ author_name <chr> "Kamil Koziej", "Kamil Koziej", "Kamil Koziej", "Krysti…
#> $ additions <int> 559, 0, 219, 1, 2, 108, 38, 83, 14, 1596, 973, 1292, 3,…
#> $ deletions <int> 304, 19, 87, 1, 1, 1, 0, 29, 0, 340, 163, 799, 6, 54, 1…
#> $ repository <chr> "cohortBuilder", "cohortBuilder", "cohortBuilder", "coh…
#> $ organization <chr> "r-world-devs", "r-world-devs", "r-world-devs", "r-worl…
#> $ repo_url <chr> "https://github.com/r-world-devs/cohortBuilder", "https…
#> $ api_url <glue> "https://api.github.com/graphql", "https://api.github.…
Or simply change the parameters for the function:
commits <- get_commits(
gitstats = git_stats,
since = "2024-07-01",
progress = FALSE
)
#> ℹ Parameters changed, I will pull data from API.
#> → [Host:GitHub][Engine:GraphQl][Scope:r-world-devs] Pulling commits...
#> → [Host:GitHub][Engine:GraphQl][Scope:openpharma] Pulling commits...
#> → [Host:GitLab][Engine:REST][Scope:mbtests] Pulling commits...
#> → Looking up for authors' names and logins...
#> ✔ Data pulled in 59.6 secs
dplyr::glimpse(commits)
#> Rows: 1,924
#> Columns: 11
#> $ id <chr> "C_kwDOHYNOFdoAKDA4NjcxM2ZiNmU5MGE5ZDhjMmVkODA5M2M1YWQ3…
#> $ committed_date <dttm> 2025-03-18 11:08:51, 2025-03-12 12:17:22, 2025-02-19 1…
#> $ author <chr> "Adam Foryś", "Adam Foryś", "Adam Foryś", "Dawid Borysi…
#> $ author_login <chr> "galachad", "galachad", "galachad", "syroBx", "syroBx",…
#> $ author_name <chr> "Adam Foryś", "Adam Foryś", "Adam Foryś", "Dawid Borysi…
#> $ additions <int> 2, 24, 31, 404, 65, 35, 99, 99, 259, 207, 0, 83, 52, 2,…
#> $ deletions <int> 1, 10, 1, 405, 0, 32, 0, 0, 1, 0, 3, 1, 1, 2, 1, 1, 1, …
#> $ repository <chr> "cohortBuilder", "cohortBuilder", "cohortBuilder", "coh…
#> $ organization <chr> "r-world-devs", "r-world-devs", "r-world-devs", "r-worl…
#> $ repo_url <chr> "https://github.com/r-world-devs/cohortBuilder", "https…
#> $ api_url <glue> "https://api.github.com/graphql", "https://api.github.…
Storage
Finally, have a glimpse at your storage:
git_stats
#> A GitStats object for 2 hosts:
#> Hosts: https://api.github.com, https://gitlab.com/api/v4
#> Scanning scope:
#> Organizations: [3] r-world-devs, openpharma, mbtests
#> Repositories: [0]
#> Storage:
#> Repositories: 90
#> Commits: 1924 [date range: 2024-07-01 - 2025-04-18]
#> Release_logs: 48 [date range: 2024-01-01 - 2025-04-18]
#> Repos_urls: 90 [type: api]
You can retrieve whole data from your GitStats
object
with:
get_storage(git_stats)
#> $repositories
#> # A tibble: 90 × 18
#> repo_id repo_name organization fullname platform repo_url api_url
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 R_kgDOHNMr2w shinyGizmo r-world-devs r-world… github https:/… https:…
#> 2 R_kgDOHYNOFQ cohortBuilder r-world-devs r-world… github https:/… https:…
#> 3 R_kgDOHYNrJw shinyCohortBuil… r-world-devs r-world… github https:/… https:…
#> 4 R_kgDOHYNxtw cohortBuilder.db r-world-devs r-world… github https:/… https:…
#> 5 R_kgDOIvtxsg GitStats r-world-devs r-world… github https:/… https:…
#> 6 R_kgDOJAtHJA shinyTimelines r-world-devs r-world… github https:/… https:…
#> 7 R_kgDOJKQ8Lg ROhdsiWebApi r-world-devs r-world… github https:/… https:…
#> 8 R_kgDOJWYrCA hypothesis r-world-devs r-world… github https:/… https:…
#> 9 R_kgDOMHUIwg useR2024-master… r-world-devs r-world… github https:/… https:…
#> 10 R_kgDOMMESGQ dbplyr r-world-devs r-world… github https:/… https:…
#> # ℹ 80 more rows
#> # ℹ 11 more variables: created_at <dttm>, last_activity_at <dttm>,
#> # last_activity <drtn>, default_branch <chr>, stars <int>, forks <int>,
#> # languages <chr>, issues_open <int>, issues_closed <int>,
#> # contributors <chr>, contributors_n <int>
#>
#> $commits
#> # A tibble: 1,924 × 11
#> id committed_date author author_login author_name additions deletions
#> <chr> <dttm> <chr> <chr> <chr> <int> <int>
#> 1 C_kw… 2025-03-18 11:08:51 Adam … galachad Adam Foryś 2 1
#> 2 C_kw… 2025-03-12 12:17:22 Adam … galachad Adam Foryś 24 10
#> 3 C_kw… 2025-02-19 16:30:51 Adam … galachad Adam Foryś 31 1
#> 4 C_kw… 2025-02-19 12:37:13 Dawid… syroBx Dawid Bory… 404 405
#> 5 C_kw… 2025-02-18 16:20:50 Dawid… syroBx Dawid Bory… 65 0
#> 6 C_kw… 2025-02-10 11:52:23 Adam … galachad Adam Foryś 35 32
#> 7 C_kw… 2025-02-06 08:44:21 Adam … galachad Adam Foryś 99 0
#> 8 C_kw… 2025-02-04 15:05:46 Borys syroBx Dawid Bory… 99 0
#> 9 C_kw… 2025-02-04 14:03:43 Borys syroBx Dawid Bory… 259 1
#> 10 C_kw… 2025-02-04 10:51:15 Adam … galachad Adam Foryś 207 0
#> # ℹ 1,914 more rows
#> # ℹ 4 more variables: repository <chr>, organization <chr>, repo_url <chr>,
#> # api_url <glue>
#>
#> $users
#> NULL
#>
#> $files
#> NULL
#>
#> $files_structure
#> NULL
#>
#> $R_package_usage
#> NULL
#>
#> $release_logs
#> # A tibble: 48 × 7
#> repo_name repo_url release_name release_tag published_at release_url
#> <chr> <chr> <chr> <chr> <dttm> <chr>
#> 1 cohortBuil… https:/… cohortBuild… v0.3.0 2024-09-27 11:35:06 https://gi…
#> 2 shinyCohor… https:/… v0.3.1 v0.3.1 2024-10-24 08:21:19 https://gi…
#> 3 shinyCohor… https:/… v0.3.0 v0.3.0 2024-10-24 08:20:32 https://gi…
#> 4 GitStats https:/… GitStats 2.… v2.3.0 2025-04-03 09:09:52 https://gi…
#> 5 GitStats https:/… GitStats 2.… v2.2.2 2025-02-11 11:22:35 https://gi…
#> 6 GitStats https:/… GitStats 2.… v2.2.1 2025-01-21 11:04:20 https://gi…
#> 7 GitStats https:/… GitStats 2.… v2.2.0 2025-01-14 14:34:26 https://gi…
#> 8 GitStats https:/… GitStats 2.… v2.1.2 2024-11-13 10:27:51 https://gi…
#> 9 GitStats https:/… GitStats 2.… v2.1.1 2024-10-29 07:46:43 https://gi…
#> 10 GitStats https:/… 2.1.0 v2.1.0 2024-10-01 07:29:43 https://gi…
#> # ℹ 38 more rows
#> # ℹ 1 more variable: release_log <chr>
#>
#> $repos_urls
#> [1] "https://api.github.com/repos/r-world-devs/shinyGizmo"
#> [2] "https://api.github.com/repos/r-world-devs/cohortBuilder"
#> [3] "https://api.github.com/repos/r-world-devs/shinyCohortBuilder"
#> [4] "https://api.github.com/repos/r-world-devs/cohortBuilder.db"
#> [5] "https://api.github.com/repos/r-world-devs/GitStats"
#> [6] "https://api.github.com/repos/r-world-devs/shinyTimelines"
#> [7] "https://api.github.com/repos/r-world-devs/ROhdsiWebApi"
#> [8] "https://api.github.com/repos/r-world-devs/hypothesis"
#> [9] "https://api.github.com/repos/r-world-devs/useR2024-mastering-plumber-api"
#> [10] "https://api.github.com/repos/r-world-devs/dbplyr"
#> [11] "https://api.github.com/repos/r-world-devs/IncidencePrevalence"
#> [12] "https://api.github.com/repos/r-world-devs/MegaStudy"
#> [13] "https://api.github.com/repos/r-world-devs/useR2024-cohortBuilder-minidemo"
#> [14] "https://api.github.com/repos/r-world-devs/queryBuilder"
#> [15] "https://api.github.com/repos/r-world-devs/shinyQueryBuilder"
#> [16] "https://api.github.com/repos/r-world-devs/GitAI"
#> [17] "https://api.github.com/repos/r-world-devs/ellmer"
#> [18] "https://api.github.com/repos/openpharma/openpharma.github.io"
#> [19] "https://api.github.com/repos/openpharma/crmPack"
#> [20] "https://api.github.com/repos/openpharma/visR"
#> [21] "https://api.github.com/repos/openpharma/pypharma_nlp"
#> [22] "https://api.github.com/repos/openpharma/RDO"
#> [23] "https://api.github.com/repos/openpharma/syntrial"
#> [24] "https://api.github.com/repos/openpharma/simaerep"
#> [25] "https://api.github.com/repos/openpharma/CTP"
#> [26] "https://api.github.com/repos/openpharma/sas7bdat"
#> [27] "https://api.github.com/repos/openpharma/visR-docs"
#> [28] "https://api.github.com/repos/openpharma/facetsr"
#> [29] "https://api.github.com/repos/openpharma/GithubMetrics"
#> [30] "https://api.github.com/repos/openpharma/BBS-causality-training"
#> [31] "https://api.github.com/repos/openpharma/synthetic.data.submission.shiny"
#> [32] "https://api.github.com/repos/openpharma/synthetic.data.archive"
#> [33] "https://api.github.com/repos/openpharma/tester"
#> [34] "https://api.github.com/repos/openpharma/staged.dependencies"
#> [35] "https://api.github.com/repos/openpharma/openpharma_log"
#> [36] "https://api.github.com/repos/openpharma/quality_risk_assesment_clinical_trials"
#> [37] "https://api.github.com/repos/openpharma/stageddeps.house"
#> [38] "https://api.github.com/repos/openpharma/stageddeps.garden"
#> [39] "https://api.github.com/repos/openpharma/stageddeps.food"
#> [40] "https://api.github.com/repos/openpharma/stageddeps.electricity"
#> [41] "https://api.github.com/repos/openpharma/stageddeps.elecinfra"
#> [42] "https://api.github.com/repos/openpharma/stageddeps.water"
#> [43] "https://api.github.com/repos/openpharma/DataFakeR"
#> [44] "https://api.github.com/repos/openpharma/rinpharma_workshop_2021_old"
#> [45] "https://api.github.com/repos/openpharma/rinpharma_workshop_2021"
#> [46] "https://api.github.com/repos/openpharma/elaborator"
#> [47] "https://api.github.com/repos/openpharma/graphicalMCP"
#> [48] "https://api.github.com/repos/openpharma/mmrm"
#> [49] "https://api.github.com/repos/openpharma/opensource_dashboard"
#> [50] "https://api.github.com/repos/openpharma/phuse-scripts"
#> [51] "https://api.github.com/repos/openpharma/trialreport"
#> [52] "https://api.github.com/repos/openpharma/openpharma_ml"
#> [53] "https://api.github.com/repos/openpharma/mtdesign"
#> [54] "https://api.github.com/repos/openpharma/rbqmR"
#> [55] "https://api.github.com/repos/openpharma/.github"
#> [56] "https://api.github.com/repos/openpharma/hta-collaborations"
#> [57] "https://api.github.com/repos/openpharma/savvyr"
#> [58] "https://api.github.com/repos/openpharma/roxytypes"
#> [59] "https://api.github.com/repos/openpharma/roxylint"
#> [60] "https://api.github.com/repos/openpharma/autoquarto"
#> [61] "https://api.github.com/repos/openpharma/workshop-r-swe"
#> [62] "https://api.github.com/repos/openpharma/brms.mmrm"
#> [63] "https://api.github.com/repos/openpharma/workshop-r-swe-sf"
#> [64] "https://api.github.com/repos/openpharma/RobinCar2"
#> [65] "https://api.github.com/repos/openpharma/filters"
#> [66] "https://api.github.com/repos/openpharma/workshop-r-swe-md"
#> [67] "https://api.github.com/repos/openpharma/workshop-r-swe-mtl"
#> [68] "https://api.github.com/repos/openpharma/CAMIS"
#> [69] "https://api.github.com/repos/openpharma/clindata"
#> [70] "https://api.github.com/repos/openpharma/SafetySignalDetection.jl"
#> [71] "https://api.github.com/repos/openpharma/os-metadata"
#> [72] "https://api.github.com/repos/openpharma/diffdf"
#> [73] "https://api.github.com/repos/openpharma/clinsight"
#> [74] "https://api.github.com/repos/openpharma/beeca"
#> [75] "https://api.github.com/repos/openpharma/beeca-simulations"
#> [76] "https://api.github.com/repos/openpharma/DoseFinding"
#> [77] "https://api.github.com/repos/openpharma/generate_badges"
#> [78] "https://api.github.com/repos/openpharma/workshop-r-swe-rinpharma-2024"
#> [79] "https://api.github.com/repos/openpharma/rbmiUtils"
#> [80] "https://api.github.com/repos/openpharma/bfboin"
#> [81] "https://gitlab.com/api/v4/projects/61399846"
#> [82] "https://gitlab.com/api/v4/projects/47383376"
#> [83] "https://gitlab.com/api/v4/projects/45334037"
#> [84] "https://gitlab.com/api/v4/projects/45300912"
#> [85] "https://gitlab.com/api/v4/projects/44565479"
#> [86] "https://gitlab.com/api/v4/projects/44346961"
#> [87] "https://gitlab.com/api/v4/projects/44293594"
#> [88] "https://gitlab.com/api/v4/projects/43875717"
#> [89] "https://gitlab.com/api/v4/projects/43400864"
#> [90] "https://gitlab.com/api/v4/projects/43398933"
#> attr(,"class")
#> [1] "gitstats_repos_urls" "character"
#> attr(,"type")
#> [1] "api"
Or particular data set:
get_storage(
gitstats = git_stats,
storage = "repositories"
)
#> # A tibble: 90 × 18
#> repo_id repo_name organization fullname platform repo_url api_url
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 R_kgDOHNMr2w shinyGizmo r-world-devs r-world… github https:/… https:…
#> 2 R_kgDOHYNOFQ cohortBuilder r-world-devs r-world… github https:/… https:…
#> 3 R_kgDOHYNrJw shinyCohortBuil… r-world-devs r-world… github https:/… https:…
#> 4 R_kgDOHYNxtw cohortBuilder.db r-world-devs r-world… github https:/… https:…
#> 5 R_kgDOIvtxsg GitStats r-world-devs r-world… github https:/… https:…
#> 6 R_kgDOJAtHJA shinyTimelines r-world-devs r-world… github https:/… https:…
#> 7 R_kgDOJKQ8Lg ROhdsiWebApi r-world-devs r-world… github https:/… https:…
#> 8 R_kgDOJWYrCA hypothesis r-world-devs r-world… github https:/… https:…
#> 9 R_kgDOMHUIwg useR2024-master… r-world-devs r-world… github https:/… https:…
#> 10 R_kgDOMMESGQ dbplyr r-world-devs r-world… github https:/… https:…
#> # ℹ 80 more rows
#> # ℹ 11 more variables: created_at <dttm>, last_activity_at <dttm>,
#> # last_activity <drtn>, default_branch <chr>, stars <int>, forks <int>,
#> # languages <chr>, issues_open <int>, issues_closed <int>,
#> # contributors <chr>, contributors_n <int>
Commits statistics
Pull statistics in one pipe:
commits_stats <- get_commits(
gitstats = git_stats,
since = "2024-06-01",
until = "2024-06-30",
verbose = FALSE
) |>
get_commits_stats(
time_aggregation = "year",
group_var = author_name
)
dplyr::glimpse(commits_stats)
#> Rows: 20
#> Columns: 4
#> $ stats_date <dttm> 2024-01-01, 2024-01-01, 2024-01-01, 2024-01-01, 2024-01-0…
#> $ githost <chr> "github", "github", "github", "github", "github", "github"…
#> $ author_name <chr> "Aaron Clark", "Björn Bornkamp", "Chao Cheng", "Daniel Sab…
#> $ stats <int> 16, 1, 1, 9, 12, 1, 3, 1, 1, 1, 16, 6, 13, 43, 11, 3, 1, 2…