Fix behaviour when error occurs
This commit is contained in:
parent
214e8c60ef
commit
9bcbb65484
3
main.go
3
main.go
|
@ -67,7 +67,6 @@ func main() {
|
|||
ctx, err := githubactions.Context()
|
||||
if err != nil {
|
||||
githubactions.Fatalf("could not get context: %v", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
token := os.Getenv("GITHUB_TOKEN")
|
||||
|
@ -76,13 +75,11 @@ func main() {
|
|||
config, err := ParseActionConfig(*ctx)
|
||||
if err != nil {
|
||||
githubactions.Fatalf("%v", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
pr, err := createPullRequest(ctx.ServerURL, token, *config)
|
||||
if err != nil {
|
||||
githubactions.Fatalf("Error while creating pr: %v", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("Created PR with id %d\n", pr.ID)
|
||||
|
|
Loading…
Reference in New Issue