Fix behaviour if the PR does already exists
This commit is contained in:
parent
54f8740a56
commit
10b487d09d
6
main.go
6
main.go
|
@ -82,7 +82,11 @@ func main() {
|
||||||
githubactions.Fatalf("Error while creating pr: %v", err.Error())
|
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-number", strconv.FormatInt(pr.Index, 10))
|
||||||
githubactions.SetOutput("pull-request-url", pr.URL)
|
githubactions.SetOutput("pull-request-url", pr.URL)
|
||||||
|
|
Loading…
Reference in New Issue