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

Bump version to 202 #449

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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: 2 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: GitStats
Title: Get Statistics from GitHub and GitLab
Version: 2.0.1.90032
Version: 2.0.2
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
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# GitStats (development version)
# GitStats 2.0.2

- Added new `get_repos_urls()` function to fetch repository URLs (either web or API - choose with `type` parameter). It may return also only these repository URLs that consist of a given file or files (with passing argument to `with_files` parameter) or a text in code blobs (`with_code` parameter). This is a minimalist version of `get_repos()`, which takes out all the process of parsing (search response into repositories one) and adding statistics on repositories. This makes it poorer with content but faster. ([#425](https://github.com/r-world-devs/GitStats/issues/425)).
- Added `with_files` parameter to `get_repos()` function, which makes it possible to search for repositories with a given file or files and return full output for repositories.
- It is also possible now to pass multiple code phrases to `with_code` parameter (as a character vector) in `get_repos()` and `get_repos_urls()` ([282](https://github.com/r-world-devs/GitStats/issues/282)).
- Added `in_files` parameter to `get_repos()` which works with `with_code` parameter. When both are defined, `GitStats` searches code blobs only in given files.
- Removed `dplyr::glimpse()` from `get_*()` functions, so there is printing to console only if `get_*()` function is not assigned to the object ([#426](https://github.com/r-world-devs/GitStats/issues/426)).
- Output table of `get_R_package_usage()` consists now also of repository full name ([#438](https://github.com/r-world-devs/GitStats/issues/438)).
- Improved `get_R_package_usage()` with optimizing search of package names in `DESCRIPTION` and `NAMESPACE` files by removing filtering method and replacing it with `filename:` filter directly in search endpoint query ([#428](https://github.com/r-world-devs/GitStats/issues/438)).
- Improved `get_R_package_usage()` with optimizing search of package names in `DESCRIPTION` and `NAMESPACE` files by removing filtering method and replacing it with `filename:` filter directly in search endpoint query ([#428](https://github.com/r-world-devs/GitStats/issues/428)).
- Fixed `get_files()` when scanning scope is set to `repositories`. Earlier, it pulled given files from whole organizations, even if scanning scope was set to `repos` with `set_*_host()`. Now it shows only files for the given repositories ([#439](https://github.com/r-world-devs/GitStats/issues/439)).

# GitStats 2.0.1

Expand Down
28 changes: 16 additions & 12 deletions R/gitstats_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ set_gitlab_host <- function(gitstats_object,
return(invisible(gitstats_object))
}

#' @title Get information on repositories
#' @title Get data on repositories
#' @name get_repos
#' @description List all repositories for an organization or by a keyword.
#' @description Pulls data on all repositories for an organization or those
#' with a given text in code blobs (`with_code` parameter) or a file
#' (`with_file` parameter) and parse it into table format.
maciekbanas marked this conversation as resolved.
Show resolved Hide resolved
#' @param gitstats_object A GitStats object.
#' @param add_contributors A logical parameter to decide whether to add
#' information about repositories' contributors to the repositories output
Expand Down Expand Up @@ -147,9 +149,11 @@ get_repos <- function(gitstats_object,
)
}

#' @title List repository URLS
#' @title Get repository URLS
#' @name get_repos_urls
#' @description A wrapper over search API endpoints to list repositories URLS.
#' @description Pulls a vector of repositories URLS (web or API): either all for
maciekbanas marked this conversation as resolved.
Show resolved Hide resolved
#' an organization or those with a given text in code blobs (`with_code`
#' parameter) or a file (`with_file` parameter).
maciekbanas marked this conversation as resolved.
Show resolved Hide resolved
#' @param gitstats_object A GitStats object.
#' @param type A character, choose if `api` or `web` (`html`) URLs should be
#' returned.
Expand Down Expand Up @@ -197,7 +201,7 @@ get_repos_urls <- function(gitstats_object,
)
}

#' @title Get information on commits
#' @title Get data on commits
#' @name get_commits
#' @description List all commits from all repositories for an organization or a
#' vector of repositories.
Expand Down Expand Up @@ -239,7 +243,7 @@ get_commits <- function(gitstats_object,
)
}

#' @title Get statistics on commits
#' @title Get commits statistics
#' @name get_commits_stats
#' @description Prepare statistics from the pulled commits data.
#' @details To make function work, you need first to get commits data with
Expand Down Expand Up @@ -268,7 +272,6 @@ get_commits_stats = function(gitstats_object,

#' @title Get users data
#' @name get_users
#' @description Pull users data from Git Host.
#' @param gitstats_object A GitStats object.
#' @param logins A character vector of logins.
#' @param cache A logical, if set to `TRUE` GitStats will retrieve the last
Expand Down Expand Up @@ -301,16 +304,17 @@ get_users <- function(gitstats_object,
)
}

#' @title Get files content
#' @title Get data on files
#' @name get_files
#' @description Pull files content from Git Hosts.
#' @description Pull text files content for a given scope (orgs, repos or whole
#' git hosts).
#' @param gitstats_object A GitStats object.
#' @param file_path A standardized path to file(s) in repositories. May be a
#' character vector if multiple files are to be pulled.
#' @param cache A logical, if set to `TRUE` GitStats will retrieve the last
#' result from its storage.
#' @param verbose A logical, `TRUE` by default. If `FALSE` messages and
#' printing output is switched off.
#' @param verbose A logical, `TRUE` by default. If `FALSE` messages and printing
#' output is switched off.
#' @examples
#' \dontrun{
#' my_gitstats <- create_gitstats() %>%
Expand All @@ -337,7 +341,7 @@ get_files <- function(gitstats_object,
)
}

#' @title Get information on package usage across repositories
#' @title Get data on package usage across repositories
#' @name get_R_package_usage
#' @description Wrapper over searching repositories by code blobs related to
#' loading package (`library(package)` and `require(package)` in all files) or
Expand Down
2 changes: 1 addition & 1 deletion man/get_R_package_usage.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_commits.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_commits_stats.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions man/get_files.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/get_repos.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/get_repos_urls.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_users.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.2.2",
"Version": "4.3.3",
"Repositories": [
{
"Name": "CRAN",
Expand Down
Loading