-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixes impending cran-ban of git2r
- Loading branch information
Showing
10 changed files
with
521 additions
and
679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
^NEWS\.md$ | ||
^README\.md$ | ||
^docs$ | ||
^Meta$ | ||
^doc$ | ||
^CRAN-SUBMISSION$ | ||
^autonewsmd-manual\.tex$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: autonewsmd | ||
Title: Auto-Generate Changelog using Conventional Commits | ||
Version: 0.0.8.9002 | ||
Version: 0.0.9 | ||
Authors@R: | ||
person("Lorenz A.", "Kapsner", , "[email protected]", role = c("cre", "aut", "cph"), | ||
comment = c(ORCID = "0000-0003-1866-860X")) | ||
|
@@ -14,19 +14,19 @@ Depends: | |
R (>= 3.6) | ||
Imports: | ||
data.table, | ||
git2r, | ||
magrittr, | ||
quarto, | ||
R6, | ||
utils | ||
Suggests: | ||
git2r, | ||
lintr, | ||
testthat (>= 3.0.1) | ||
VignetteBuilder: | ||
quarto | ||
Config/testthat/edition: 3 | ||
Config/testthat/parallel: false | ||
Date/Publication: 2024-07-11 11:13:28.869177 UTC | ||
Date/Publication: 2024-10-15 09:18:54.725856 UTC | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
SystemRequirements: Quarto command line tools | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,39 +31,42 @@ | |
#' ## Initialize a repository | ||
#' path <- file.path(tempdir(), "autonewsmd") | ||
#' dir.create(path) | ||
#' | ||
#' if (requireNamespace("git2r", quietly = TRUE)) { | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config(repo, user.name = "Alice", user.email = "[email protected]") | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' ## Config user | ||
#' git2r::config(repo, user.name = "Alice", user.email = "[email protected]") | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' | ||
#' | ||
#' ## Write to a file and commit | ||
#' lines <- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' ## Write to a file and commit | ||
#' lines <- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' | ||
#' ## generate the news and write them to the repo | ||
#' an$generate() | ||
#' ## generate the news and write them to the repo | ||
#' an$generate() | ||
#' | ||
#' if (interactive()) { | ||
#' an$write() | ||
#' if (interactive()) { | ||
#' an$write() | ||
#' } | ||
#' } | ||
#' | ||
#' @export | ||
|
@@ -112,37 +115,40 @@ autonewsmd <- R6::R6Class( | |
#' ## Initialize a repository | ||
#' path <- file.path(tempdir(), "autonewsmd") | ||
#' dir.create(path) | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config( | ||
#' repo, user.name = "Alice", user.email = "[email protected]" | ||
#' ) | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' if (requireNamespace("git2r", quietly = TRUE)) { | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config( | ||
#' repo, user.name = "Alice", user.email = "[email protected]" | ||
#' ) | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' | ||
#' | ||
#' ## Write to a file and commit | ||
#' lines <- paste0( | ||
#' "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' ) | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' ## Write to a file and commit | ||
#' lines <- paste0( | ||
#' "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' ) | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' } | ||
#' | ||
initialize = function( | ||
repo_name, | ||
|
@@ -166,40 +172,43 @@ autonewsmd <- R6::R6Class( | |
#' ## Initialize a repository | ||
#' path <- file.path(tempdir(), "autonewsmd") | ||
#' dir.create(path) | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config( | ||
#' repo, user.name = "Alice", user.email = "[email protected]" | ||
#' ) | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' if (requireNamespace("git2r", quietly = TRUE)) { | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config( | ||
#' repo, user.name = "Alice", user.email = "[email protected]" | ||
#' ) | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' | ||
#' ## Write to a file and commit | ||
#' lines <- paste0( | ||
#' "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' ) | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' ## Write to a file and commit | ||
#' lines <- paste0( | ||
#' "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' ) | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' | ||
#' ## generate the news and write them to the repo | ||
#' an$generate() | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' | ||
#' ## generate the news and write them to the repo | ||
#' an$generate() | ||
#' } | ||
#' | ||
generate = function() { | ||
generate_autonewsmd(self, private) | ||
|
@@ -223,43 +232,46 @@ autonewsmd <- R6::R6Class( | |
#' # (Example is based on the public examples from the `git2r` R package) | ||
#' ## Initialize a repository | ||
#' path <- tempdir() | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config( | ||
#' repo, user.name = "Alice", user.email = "[email protected]" | ||
#' ) | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' if (requireNamespace("git2r", quietly = TRUE)) { | ||
#' repo <- git2r::init(path) | ||
#' | ||
#' ## Config user | ||
#' git2r::config( | ||
#' repo, user.name = "Alice", user.email = "[email protected]" | ||
#' ) | ||
#' git2r::remote_set_url(repo, "foobar", "https://example.org/git2r/foobar") | ||
#' | ||
#' | ||
#' ## Write to a file and commit | ||
#' lines <- paste0( | ||
#' "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' ) | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' ## Write to a file and commit | ||
#' lines <- paste0( | ||
#' "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do" | ||
#' ) | ||
#' writeLines(lines, file.path(path, "example.txt")) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "feat: new file") | ||
#' | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' ## Write again to a file and commit | ||
#' lines2 <- paste0( | ||
#' "eiusmod tempor incididunt ut labore et dolore magna aliqua. ", | ||
#' "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ", | ||
#' "nisi ut aliquip ex ea commodo consequat." | ||
#' ) | ||
#' write(lines2, file.path(path, "example.txt"), append = TRUE) | ||
#' | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' git2r::add(repo, "example.txt") | ||
#' git2r::commit(repo, "refactor: added second phrase") | ||
#' | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' ## now construct a new autonewsmd object | ||
#' an <- autonewsmd$new(repo_name = "TestRepo", repo_path = path) | ||
#' | ||
#' ## generate the news and write them to the repo | ||
#' an$generate() | ||
#' ## generate the news and write them to the repo | ||
#' an$generate() | ||
#' | ||
#' if (interactive()) { | ||
#' an$write() | ||
#' if (interactive()) { | ||
#' an$write() | ||
#' } | ||
#' } | ||
#' | ||
write = function(force = FALSE, con = NULL) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
## R CMD check results | ||
|
||
0 errors | 0 warnings | 0 notes | ||
|
||
Addresses the impending ban of git2r from cran. |
Oops, something went wrong.