Skip to content

Commit

Permalink
Merge pull request #67 from r-world-devs/maciekbanas/64/add-ability-t…
Browse files Browse the repository at this point in the history
…o-set-and-scan-the-whole-orgs

Make possible passing all parameters to GitStats::set_*_host().
  • Loading branch information
maciekbanas authored Dec 9, 2024
2 parents 7e1d3da + 9b8b451 commit db04c23
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: GitAI
Title: Extracts Knowledge From Git Repositories
Version: 0.0.0.9009
Version: 0.0.0.9010
Authors@R: c(
person("Kamil", "Wais", , "[email protected]", role = c("aut", "cre")),
person("Krystian", "Igras", , "[email protected]", role = "aut"),
Expand Down
24 changes: 10 additions & 14 deletions R/set_repos.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#' Set GitHub repositories in `GitAI` object.
#' @name set_github_repos
#' @param gitai A \code{GitAI} object.
#' @param host A character, GitHub host.
#' @param repos A character vector or repositories full names.
#' @param verbose A logical. If \code{FALSE} you won't be getting
#' additional diagnostic messages.
#' @param ... Parameters to pass to \code{\link[GitStats]{set_github_host}}
#' function.
#' @param verbose A logical. If \code{FALSE} you won't be getting additional
#' diagnostic messages.
#' @return A \code{GitAI} object.
#' @export
set_github_repos <- function(gitai,
host = NULL,
repos,
... = ...,
verbose = is_verbose()) {
if (is.null(gitai$gitstats)) {
gitstats <- GitStats::create_gitstats()
Expand All @@ -18,8 +17,7 @@ set_github_repos <- function(gitai,
}
gitai$gitstats <- gitstats |>
GitStats::set_github_host(
host = host,
repos = repos,
... = ...,
verbose = verbose
)
invisible(gitai)
Expand All @@ -28,15 +26,14 @@ set_github_repos <- function(gitai,
#' Set GitLab repositories in `GitAI` object.
#' @name set_gitlab_repos
#' @param gitai A \code{GitAI} object.
#' @param host A character, GitLab host.
#' @param repos A character vector or repositories full names.
#' @param ... Parameters to pass to \code{\link[GitStats]{set_gitlab_host}}
#' function.
#' @param verbose A logical. If \code{FALSE} you won't be getting
#' additional diagnostic messages.
#' @return A \code{GitAI} object.
#' @export
set_gitlab_repos <- function(gitai,
host = NULL,
repos,
... = ...,
verbose = is_verbose()) {
if (is.null(gitai$gitstats)) {
gitstats <- GitStats::create_gitstats()
Expand All @@ -45,8 +42,7 @@ set_gitlab_repos <- function(gitai,
}
gitai$gitstats <- gitstats |>
GitStats::set_gitlab_host(
host = host,
repos = repos,
... = ...,
verbose = verbose
)
invisible(gitai)
Expand Down
11 changes: 5 additions & 6 deletions man/set_github_repos.Rd

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

7 changes: 3 additions & 4 deletions man/set_gitlab_repos.Rd

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

0 comments on commit db04c23

Please sign in to comment.