MCPcopy Index your code
hub / github.com/coder/coder / promptAndUpdateDocs

Function promptAndUpdateDocs

scripts/releaser/docs.go:497–519  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

495// promptAndUpdateDocs asks the user if they want to create a
496// docs update PR and does so if confirmed.
497func 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}

Callers 1

runReleaseFunction · 0.85

Calls 5

BoldFmtFunction · 0.92
confirmWithDefaultFunction · 0.85
infofFunction · 0.85
updateReleaseDocsFunction · 0.85
warnfFunction · 0.70

Tested by

no test coverage detected