Skip to content

Commit

Permalink
add error msg for creating prs on prs in doc and style
Browse files Browse the repository at this point in the history
Addresses #137
  • Loading branch information
k-doering-NOAA authored Aug 2, 2024
1 parent 2695d1a commit 37c8dee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/use_r_workflows.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ use_doc_and_style_r <- function(workflow_name = "call-doc-and-style-r.yml",
if (how_to_commit == "directly" & use_pat == TRUE) {
stop("Using how_to_commit = 'directly' and use_pat = TRUE can lead to recursive runs.")
}

if (how_to_commit == "pull_request" & build_trigger = "pull_request") {
stop("Currently it is not possible to use how_to_commit == 'pull_request' and build_trigger = 'pull_request' in ghactions4r. Instead, create your own workflow and follow this example: https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#use-case-create-a-pull-request-to-modifyfix-pull-requests")
}
# get the template github action
usethis::use_github_action("call-doc-and-style-r.yml",
save_as = workflow_name,
Expand Down

0 comments on commit 37c8dee

Please # to comment.