Skip to content

Commit ffc1769

Browse files
committed
Exit early to reduce nesting
1 parent 1a416f5 commit ffc1769

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/cran-status-check.yaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,19 @@ jobs:
4949
5050
deadline <- crandb[crandb$Package == pkgname, "Deadline"]
5151
52-
if (!is.na(deadline)) {
53-
gh::gh(
54-
"POST /repos/{owner_repo}/issues",
55-
owner_repo = Sys.getenv("GITHUB_REPOSITORY"),
56-
title = paste("Fix CRAN R CMD check issues by", deadline),
57-
body = paste0(
58-
"This package is failing CRAN checks and is at risk of archival.\n",
59-
"https://cran.r-project.org/web/checks/check_results_",
60-
pkgname,
61-
".html"
62-
),
63-
labels = list("cran-deadline")
64-
)
52+
if (is.na(deadline)) {
53+
quit()
6554
}
55+
56+
gh::gh(
57+
"POST /repos/{owner_repo}/issues",
58+
owner_repo = Sys.getenv("GITHUB_REPOSITORY"),
59+
title = paste("Fix CRAN R CMD check issues by", deadline),
60+
body = paste0(
61+
"This package is failing CRAN checks and is at risk of archival.\n",
62+
"https://cran.r-project.org/web/checks/check_results_",
63+
pkgname,
64+
".html"
65+
),
66+
labels = list("cran-deadline")
67+
)

0 commit comments

Comments
 (0)