Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.2.0 #575

Merged
merged 113 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
a603c95
Fix pulling commits for GitLab subroups when repos are set as scannin…
maciekbanas Dec 3, 2024
0e62cb8
Fill empty data for GitLab authors names and logins as much as possible.
maciekbanas Dec 4, 2024
2f7bef0
Fill GitHub's author names if empty.
maciekbanas Dec 4, 2024
b820f26
Fix.
maciekbanas Dec 4, 2024
003a6b9
Add NEWS.
maciekbanas Dec 4, 2024
4b18cb9
Add GitLab tests.
maciekbanas Dec 4, 2024
b5907c3
Add GitHub test.
maciekbanas Dec 4, 2024
fcf508c
Merge pull request #552 from r-world-devs/551-fix-pulling-commits-for…
maciekbanas Dec 4, 2024
b557c79
Handle empty GraphQL responses.
maciekbanas Dec 6, 2024
4a4cd72
Fix error with repo cursor, try handle 502 error when fails with req_…
maciekbanas Dec 6, 2024
9eed4fe
Fix tests.
maciekbanas Dec 6, 2024
19a7a97
Add test.
maciekbanas Dec 9, 2024
a0dc1ec
Merge pull request #558 from r-world-devs/555-fix-pulling-github-commits
maciekbanas Dec 9, 2024
db4e8af
Bump version.
maciekbanas Dec 10, 2024
21e8220
Add "year" as possible option to time interval, adjust better test fi…
maciekbanas Dec 10, 2024
8f4dfc3
Update docs.
maciekbanas Dec 10, 2024
bb416eb
Add possibility to pass multiple grouping variables to function and c…
maciekbanas Dec 10, 2024
bf27fac
Change name of the parametr, remove superfluous docs.
maciekbanas Dec 10, 2024
cdcc66f
Adds test for the GitStats public method.
maciekbanas Dec 10, 2024
b209dd3
Add NEWS.
maciekbanas Dec 10, 2024
e47113c
Update example and namespace to meet checks.
maciekbanas Dec 10, 2024
ce29e53
Replace ... with group_var param to make workflow more straightforwar…
maciekbanas Dec 10, 2024
2c37b82
Update docs.
maciekbanas Dec 10, 2024
154e50e
Remove `stats` parameter.
maciekbanas Dec 10, 2024
9dc7acb
Merge pull request #559 from r-world-devs/556-improve-get_commits_sta…
maciekbanas Dec 11, 2024
0af2b3b
Move get_commits_stats from GitStats, change basic input to commits_d…
maciekbanas Dec 11, 2024
14d97d5
Update example and vignettes.
maciekbanas Dec 11, 2024
cfa5b79
Try meet code coverage job.
maciekbanas Dec 11, 2024
4c2bff0
Merge pull request #560 from r-world-devs/557-modify-wokflow
maciekbanas Dec 11, 2024
0eab7aa
Make possible set searching scope to both orgs and repos and pull rep…
maciekbanas Dec 12, 2024
4b3c5a5
Fix/adjust workflows.
maciekbanas Dec 12, 2024
138f2aa
Make possible pulling commits with new approach to setting scope.
maciekbanas Dec 12, 2024
39e9024
Adjust releases to pull from both scopes, adjust tests.
maciekbanas Dec 13, 2024
abc6d7b
Fixes in function parameters and in passing properly repos names to G…
maciekbanas Dec 13, 2024
93ad9dd
Fix lint.
maciekbanas Dec 13, 2024
469573a
Adjust get_repos_urls to new scope approach, fix setting orgs when pu…
maciekbanas Dec 13, 2024
2fa819b
Add NEWS.
maciekbanas Dec 13, 2024
06c713f
Typo.
maciekbanas Dec 16, 2024
23b10ec
Fix tests.
maciekbanas Dec 16, 2024
e470ace
Adjust get_files_content() to changes in scanning scope, remove possi…
maciekbanas Dec 17, 2024
8eb4516
Fixes.
maciekbanas Dec 17, 2024
831b15b
Lint.
maciekbanas Dec 19, 2024
d6f271b
Fix printing ID of the GitLab repositories in table, style to make co…
maciekbanas Dec 19, 2024
22f077b
Apply searching for code both by orgs and repositories.
maciekbanas Dec 19, 2024
99fded8
Fix printing GitLab org in repo table when it is a subgroup. Earlier …
maciekbanas Dec 19, 2024
58540b0
Update vignettes.
maciekbanas Dec 19, 2024
ef59a17
Update workflow.
maciekbanas Dec 19, 2024
dd6321a
Fix tests.
maciekbanas Dec 19, 2024
200669d
Add test.
maciekbanas Dec 19, 2024
d2b2437
Add test to fix coverage.
maciekbanas Dec 19, 2024
59a34d2
Add tests to meet coverage threshold.
maciekbanas Dec 19, 2024
b621cab
Add tests, adjust code.
maciekbanas Dec 19, 2024
b85ed50
Fix after code review.
maciekbanas Dec 19, 2024
4f357b5
Add tests.
maciekbanas Dec 20, 2024
065b6f6
Add tests, fix GitLab commits tests.
maciekbanas Dec 20, 2024
88ed0d6
Add NEWS.
maciekbanas Dec 20, 2024
f16a1cd
Merge pull request #561 from r-world-devs/400-allow-define-orgs-and-r…
maciekbanas Dec 20, 2024
d3f47a7
Add parameter to control error when wrong repos/orgs are passed.
maciekbanas Dec 23, 2024
ed83adb
Bump version.
maciekbanas Dec 30, 2024
8f91ba7
Add possibility to pass users to GitHub `orgs` parameters.
maciekbanas Dec 30, 2024
4f1d6b2
Add NEWS.
maciekbanas Dec 31, 2024
4c330b3
Fixes for pulling repos and repos urls when user set instead of organ…
maciekbanas Dec 31, 2024
8b1c992
Merge pull request #566 from r-world-devs/547-handle-setting-wrong-repos
maciekbanas Jan 2, 2025
bd422ce
Merge pull request #568 from r-world-devs/562-setting-users-as-orgs-e…
maciekbanas Jan 7, 2025
419cc04
Bump version.
maciekbanas Jan 7, 2025
622f456
Show path instead of name in table.
maciekbanas Jan 7, 2025
a9de4e9
Merge two functions into one get_files().
maciekbanas Jan 7, 2025
1dcb0ce
Update NEWS and example workflow.
maciekbanas Jan 7, 2025
dfbf1e5
Fix, adjust and add tests.
maciekbanas Jan 7, 2025
e1d3cfb
spelling
maciekbanas Jan 7, 2025
1e88c1c
Fix printing GitStats files storage when pattern is used.
maciekbanas Jan 7, 2025
ccab351
Fix tests.
maciekbanas Jan 8, 2025
958a603
Rename test file, to properly queue tests in all scenarios. Earlier o…
maciekbanas Jan 8, 2025
fdc94e1
Fix setting attributes. Previous approach resulted in not-cacheing as…
maciekbanas Jan 8, 2025
646fdbd
Add test.
maciekbanas Jan 8, 2025
21ddd30
Merge pull request #570 from r-world-devs/564-improve-get_files
maciekbanas Jan 8, 2025
fe35f88
Fix.
maciekbanas Jan 8, 2025
522e860
Update example workflow.
maciekbanas Jan 8, 2025
a7ae9ed
Merge pull request #572 from r-world-devs/571-fix-get_files-for-gitlab
maciekbanas Jan 8, 2025
5d06e33
Bump version.
maciekbanas Jan 8, 2025
aca1b77
Update Readme with an example.
maciekbanas Jan 8, 2025
72cada1
Rename `.show_error` to `.error`.
maciekbanas Jan 8, 2025
2818427
Small update.
maciekbanas Jan 8, 2025
87dfca2
Organize Reference section.
maciekbanas Jan 8, 2025
5e86446
Add progress bar.
maciekbanas Jan 8, 2025
23b2a17
Rename S3 output classes.
maciekbanas Jan 9, 2025
9babe7c
Add more examples to README, remove article on get_files.
maciekbanas Jan 9, 2025
c214f4a
Update NEWS.
maciekbanas Jan 9, 2025
105a345
Prettify messages when pulling data, add example with setting many re…
maciekbanas Jan 9, 2025
0b9f584
Style.
maciekbanas Jan 9, 2025
85d9fdd
Style.
maciekbanas Jan 9, 2025
4b177c3
Merge pull request #574 from r-world-devs/567-prettify
maciekbanas Jan 10, 2025
81d7235
Fix tests for CRAN. Earlier snapshot tests, which do not run on CRAN,…
maciekbanas Jan 10, 2025
ee5fd26
Bump version.
maciekbanas Jan 10, 2025
fcc395d
Merge pull request #577 from r-world-devs/576-fix-tests-for-release
maciekbanas Jan 13, 2025
e389994
Bump version.
maciekbanas Jan 13, 2025
2590c6a
Merge pull request #579 from r-world-devs/578-bump-version-to-220
maciekbanas Jan 13, 2025
0ee9350
Reorganize files.
maciekbanas Jan 14, 2025
d87fe98
Bump to dev version.
maciekbanas Jan 14, 2025
2758464
Add more info on function parameters.
maciekbanas Jan 14, 2025
d7a0e87
Enhance docs.
maciekbanas Jan 14, 2025
3d1aeed
Fix cacheing, when user uses same arguments for `file_path` and `patt…
maciekbanas Jan 14, 2025
c941536
Fix workflow.
maciekbanas Jan 14, 2025
0445f71
Fix examples.
maciekbanas Jan 14, 2025
11ad4df
Cover code with tests.
maciekbanas Jan 14, 2025
f9d915c
Typo.
maciekbanas Jan 14, 2025
828aa5c
Add more docs on function usage and forbid passing vector as pattern …
maciekbanas Jan 14, 2025
8e390d0
Return possibility to pass a vector to pattern argument, fix pulling …
maciekbanas Jan 14, 2025
d1cc481
Apply suggestions from code review
maciekbanas Jan 14, 2025
9537be8
Last typo and roxygenize.
maciekbanas Jan 14, 2025
c2eee26
Merge pull request #581 from r-world-devs/580-when-using-different-se…
maciekbanas Jan 14, 2025
d06f139
Bump version
maciekbanas Jan 14, 2025
a79ee2a
Merge pull request #582 from r-world-devs/bump-version-220
maciekbanas Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: GitStats
Title: Standardized Git Repository Data
Version: 2.1.2
Version: 2.2.0
Authors@R: c(
person(given = "Maciej", family = "Banas", email = "banasmaciek@gmail.com", role = c("aut", "cre")),
person(given = "Kamil", family = "Koziej", email = "koziej.k@gmail.com", role = "aut"),
Expand Down
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export(create_gitstats)
export(get_R_package_usage)
export(get_commits)
export(get_commits_stats)
export(get_files_content)
export(get_files_structure)
export(get_files)
export(get_release_logs)
export(get_repos)
export(get_repos_urls)
Expand Down Expand Up @@ -42,6 +41,7 @@ importFrom(purrr,map)
importFrom(purrr,map_chr)
importFrom(rlang,"%||%")
importFrom(rlang,expr)
importFrom(stats,runif)
importFrom(stringr,str_length)
importFrom(stringr,str_replace)
importFrom(utils,URLdecode)
Expand Down
23 changes: 23 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# GitStats 2.2.0

This release brings some substantial improvements with making it possible to scan whole organizations and particular repositories for one host at the same time, boosting function to prepare commits statistics and simplifying workflow for getting files.

## Features:

- From now on it is possible to pass `orgs` and `repos` in `set_*_host()` functions ([#400](https://github.com/r-world-devs/GitStats/issues/400)).
- Improved `get_commits_stats()` function ([#556](https://github.com/r-world-devs/GitStats/issues/556), [#557](https://github.com/r-world-devs/GitStats/issues/557)) with:
- giving possibility to customize grouping variable by passing it with the `group_var` parameter,
- changing name of the `time_interval` parameter to `time_aggregation`,
- adding `yearly` aggregation to `time_aggregation` parameter,
- changing basic input from `GitStats` to `commits_data` object which allows to build workflow in one pipeline (`create_gitstats() |> set_*_host() |> get_commits() |> get_commits_stats()`).
- Merged two functions `get_files_content()` and `get_files_structure()` into one `get_files()` ([#564](https://github.com/r-world-devs/GitStats/issues/564)).
- Add `.error` parameter to the `set_*_host()` functions to control if error should pop up when wrong input is passed ([#547](https://github.com/r-world-devs/GitStats/issues/547)).

## Fixes:

- Fixed pulling commits for GitLab subgroups when repositories are set as scope to scan ([#551](https://github.com/r-world-devs/GitStats/issues/551)).
- Filled more information on `author_name` and `author_login` if it was missing in `commits_table` ([#550](https://github.com/r-world-devs/GitStats/issues/550)).
- Handled a `GraphQL` response error when pulling repositories with R error. Earlier, `GitStats` just returned empty table with no clue on what has happened, as errors from `GraphQL` are returned as list outputs (they do not break code).
- Fixed getting R package usage when repositories are set ([#548](https://github.com/r-world-devs/GitStats/issues/548)).
- Added possibility to pass GitHub users to `orgs` parameter in `set_github_host()` ([#562](https://github.com/r-world-devs/GitStats/issues/562)).

# GitStats 2.1.2

This is a patch release which introduces some hot fixes and new data in `get_commits()` output.
Expand Down
14 changes: 7 additions & 7 deletions R/EngineGraphQL.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,25 @@ EngineGraphQL <- R6::R6Class(
httr2::req_body_json(list(query = gql_query, variables = vars)) %>%
httr2::req_retry(
is_transient = ~ httr2::resp_status(.x) %in% c(400, 502),
max_seconds = 30
max_seconds = 60
) %>%
httr2::req_perform()
return(response)
},

is_query_error = function(response) {
check <- FALSE
if (length(response) > 0) {
check <- names(response) == "errors"
check <- any(names(response) == "errors")
}
return(check)
},

filter_files_by_pattern = function(files_structure, pattern) {
files_structure[grepl(pattern, files_structure)]
files_structure[grepl(paste0(pattern, collapse = "|"), files_structure)]
},

get_path_from_files_structure = function(host_files_structure,
only_text_files,
org,
repo = NULL) {
if (is.null(repo)) {
Expand All @@ -82,9 +84,7 @@ EngineGraphQL <- R6::R6Class(
} else {
file_path <- host_files_structure[[org]][[repo]]
}
if (only_text_files) {
file_path <- file_path[!grepl(non_text_files_pattern, file_path)]
}
file_path <- file_path[grepl(text_files_pattern, file_path)]
return(file_path)
}
)
Expand Down
Loading
Loading