Fix behaviour if the PR does already exists

This commit is contained in:
Julien Fastré 2024-03-08 12:44:13 +01:00
parent 54f8740a56
commit 10b487d09d
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
1 changed files with 5 additions and 1 deletions

View File

@ -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)