From 10b487d09d76dd7e194b062332426eaa311631e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 8 Mar 2024 12:44:13 +0100 Subject: [PATCH] Fix behaviour if the PR does already exists --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index fa11933..12ff557 100644 --- a/main.go +++ b/main.go @@ -82,7 +82,11 @@ func main() { githubactions.Fatalf("Error while creating pr: %v", err.Error()) } - fmt.Printf("Created PR with id %d\n", pr.ID) + if pr != nil { + fmt.Printf("Created PR with id %d\n", pr.ID) + } else { + fmt.Printf("No PR created\n") + } githubactions.SetOutput("pull-request-number", strconv.FormatInt(pr.Index, 10)) githubactions.SetOutput("pull-request-url", pr.URL)