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

synopsis hentet fra reps. Utgjør emnefeltet i sendt e-post. App krasj… #215

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 8 additions & 8 deletions R/autoReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -556,24 +556,24 @@
dato = Sys.Date(),
group = NULL,
type = c("subscription", "dispatchment"),
target = getConfig("rapbaseConfig.yml")$r$autoReport$target,
target = rapbase::getConfig("rapbaseConfig.yml")$r$autoReport$target,
dryRun = FALSE
) {

# get report candidates
reps <- readAutoReportData(target = target) %>%
filterAutoRep(by = "type", pass = type, target = target)
reps <- rapbase::readAutoReportData(target = target) %>%
rapbase::filterAutoRep(by = "type", pass = type, target = target)
if (!is.null(group)) {
reps <- reps %>%
filterAutoRep(by = "package", pass = group, target = target)
rapbase::filterAutoRep(by = "package", pass = group, target = target)

Check warning on line 568 in R/autoReport.R

View check run for this annotation

Codecov / codecov/patch

R/autoReport.R#L568

Added line #L568 was not covered by tests
}
if (target == "db") {
reps <- reps %>%
# nolint start: object_usage_linter
dplyr::summarise(
email = list(unique(email)),
.by = c(owner, ownerName, package, organization, type, fun,
params, startDate, terminateDate, interval)
params, startDate, terminateDate, interval, synopsis)
)
# nolint end
}
Expand Down Expand Up @@ -615,7 +615,7 @@
) # 'days', 'weeks', 'months', 'years',
)) {
# get explicit referenced function and call it
f <- .getFun(paste0(rep$package, "::", rep$fun))
f <- rapbase::.getFun(paste0(rep$package, "::", rep$fun))
content <- do.call(what = f, args = params)
if (rep$type == "bulletin") {
text <- content
Expand All @@ -627,7 +627,7 @@
if (dryRun) {
message(paste("No emails sent. Content is:", content))
} else {
autLogger(
rapbase::autLogger(

Check warning on line 630 in R/autoReport.R

View check run for this annotation

Codecov / codecov/patch

R/autoReport.R#L630

Added line #L630 was not covered by tests
user = rep$owner,
name = rep$ownerName,
registryName = rep$package,
Expand All @@ -644,7 +644,7 @@
)
)
)
sendEmail(
rapbase::sendEmail(

Check warning on line 647 in R/autoReport.R

View check run for this annotation

Codecov / codecov/patch

R/autoReport.R#L647

Added line #L647 was not covered by tests
conf = conf, to = rep$email, subject = rep$synopsis,
text = text, attFile = attFile
)
Expand Down
2 changes: 1 addition & 1 deletion man/runAutoReport.Rd

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

Loading