Skip to content

Commit

Permalink
Handle plan preview workflow's error and exit with error status code (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
TakumaKurosawa authored and sZma5a committed Dec 17, 2023
1 parent a318af7 commit 628aecd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tool/actions-plan-preview/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ func main() {
doComment(failureBadgeURL + "\nUnable to run plan-preview for a closed pull request.")
return
}
body := makeCommentBody(event, result)
doComment(failureBadgeURL + "\n" + body)
log.Println("plan-preview result has error")
os.Exit(1)
}

// Find comments we sent before
Expand Down

0 comments on commit 628aecd

Please sign in to comment.