From 37c8dee10c6196aaaf67f3de1a52d1c4201485d7 Mon Sep 17 00:00:00 2001 From: Kathryn Doering Date: Fri, 2 Aug 2024 14:27:14 -0700 Subject: [PATCH] add error msg for creating prs on prs in doc and style Addresses #137 --- R/use_r_workflows.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/use_r_workflows.R b/R/use_r_workflows.R index 45017b6..ffbe5de 100644 --- a/R/use_r_workflows.R +++ b/R/use_r_workflows.R @@ -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,