promptAndUpdateDocs asks the user if they want to create a docs update PR and does so if confirmed.
( inv *serpent.Invocation, newVer version, channel string, dryRun bool, )
| 495 | // promptAndUpdateDocs asks the user if they want to create a |
| 496 | // docs update PR and does so if confirmed. |
| 497 | func promptAndUpdateDocs( |
| 498 | inv *serpent.Invocation, |
| 499 | newVer version, |
| 500 | channel string, |
| 501 | dryRun bool, |
| 502 | ) { |
| 503 | w := inv.Stderr |
| 504 | _, _ = fmt.Fprintln(w) |
| 505 | _, _ = fmt.Fprintln(w, pretty.Sprint(cliui.BoldFmt(), |
| 506 | "Next step: create a PR updating release docs "+ |
| 507 | "(calendar, helm versions, rancher).")) |
| 508 | _, _ = fmt.Fprintln(w) |
| 509 | |
| 510 | if err := confirmWithDefault(inv, "Create docs update PR?", cliui.ConfirmYes); err != nil { |
| 511 | infof(w, "Skipped docs update. You can update them manually.") |
| 512 | return |
| 513 | } |
| 514 | |
| 515 | if err := updateReleaseDocs(inv, newVer, channel, dryRun); err != nil { |
| 516 | warnf(w, "Failed to create docs PR: %v", err) |
| 517 | warnf(w, "You'll need to update release docs manually.") |
| 518 | } |
| 519 | } |
no test coverage detected