Skip to content

Commit

Permalink
fix R build and check errors or warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed Aug 16, 2020
1 parent 71e13ca commit 34c89a5
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 26 deletions.
4 changes: 1 addition & 3 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
^docs$
^_pkgdown\.yml$
^appveyor\.yml$
^\.travis\.yml$
^cran-comments\.md$
^CODE_OF_CONDUCT\.md$
^README\.Rmd$
^LICENSE\.md$
^r2gh\.Rproj$
^\.Rproj\.user$
^\.github$
^pkgdown$
^githubr\.Rproj$
7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ LazyData: true
Roxygen: list(markdown = TRUE)
Imports:
gh,
tibble
tibble,
lifecycle
Suggests:
knitr,
rmarkdown,
testthat,
git2r
git2r,
tools
VignetteBuilder: knitr
URL: https://github.com/lwjohnst86/githubr
BugReports: https://github.com/lwjohnst86/githubr/issues
RoxygenNote: 7.1.1
RdMacros: lifecycle
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export(gh_new_issue)
export(gh_new_repo)
export(proj_repo)
export(tidy)
importFrom(lifecycle,deprecate_soft)
importFrom(tibble,tibble)
5 changes: 5 additions & 0 deletions R/githubr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
#' constructed, see the [gh](https://github.com/r-lib/gh) R package.
#' @importFrom tibble tibble
"_PACKAGE"

## usethis namespace: start
#' @importFrom lifecycle deprecate_soft
## usethis namespace: end
NULL
1 change: 1 addition & 0 deletions R/repos.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ gh_list_user_orgs <- function(tidied = TRUE) {
#'
#' @inheritParams template_github_request
#' @inheritParams gh_new_repo
#' @param name ... Need to confirm what this is for.
#' @param has_issues Whether repository should have issues.
#' @param has_projects Whether repository should have projects.
#' @param has_wiki Whether repository should have a wiki.
Expand Down
10 changes: 6 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#' Get the repository name based on remote name of the current working directory.
#' Project Git remote URL.
#'
#' @description
#' \lifecycle{experimental}
#'
#' Get the repository name based on remote name of the current working
#' directory.
#'
#' @param remote Remote name. Default is "origin".
#'
#' @return
#' @return Remote name of R Project.
#' @export
#'
#' @examples
#' proj_repo()
proj_repo <- function(remote = "origin") {
repo <- NULL
if (requireNamespace("git2r", quietly = TRUE)) {
Expand Down
2 changes: 2 additions & 0 deletions man/gh_edit_repo.Rd

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

12 changes: 6 additions & 6 deletions man/proj_repo.Rd

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

25 changes: 14 additions & 11 deletions vignettes/githubr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
helper_file <- list.files(
c(".."),
pattern = "helpers.R",
full.names = TRUE,
recursive = TRUE
)
source(tools::file_path_as_absolute(helper_file))
```

The githubr package is primarily a wrapper around the great [gh] package to
Expand Down Expand Up @@ -59,11 +66,11 @@ what you want.

```{r, echo=FALSE}
# Extract functions documentation data
func_data <- githubr:::.rd_as_data_for_table()
func_data <- .rd_as_data_for_table()
# Keep only those exposed to users and print table
funs_impl <- githubr:::.functions_implemented(func_data)
githubr:::.table_of_functions(funs_impl, caption = "Implemented githubr functions.")
funs_impl <- .functions_implemented(func_data)
.table_of_functions(funs_impl, caption = "Implemented githubr functions.")
```

### Creating, editing, and listing issues
Expand All @@ -85,20 +92,16 @@ gh_list_labels(repository)

You can even add another label (and delete it if you want).

```{r}
```{r, eval=FALSE}
gh_create_label(repository, "Interesting", "deadad")
gh_list_labels(repository)
# Then delete it
gh_delete_label(repository, "Interesting")
gh_list_labels(repository)
```

Want to create a new issue? Easy too!

```{r}
```{r, eval=FALSE}
gh_new_issue(repository, title = "Making an issue", labels = c("bug", "wontfix"))
head(gh_list_issues(repository), 1)
```

## Functions to be implemented
Expand All @@ -108,6 +111,6 @@ is a list of functions planned to be implemented at some point in the future.

```{r, echo=FALSE}
# Keep those not exposed and remove internal functions and print table
funs_to_impl <- githubr:::.functions_to_implement(func_data)
githubr:::.table_of_functions(funs_to_impl, caption = "Functions to still implement in githubr.")
funs_to_impl <- .functions_to_implement(func_data)
.table_of_functions(funs_to_impl, caption = "Functions to still implement in githubr.")
```

0 comments on commit 34c89a5

Please sign in to comment.