usertext

package
v0.0.0-...-f248f4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package usertext generates messages for users (humans) using Go templating system.

Naturally, most of these are sent in case of errors.

Index

Constants

View Source
const StoppedRun = "CV stopped processing the Run"

StoppedRun is the default message put in the reason of the attention set change when CV stops a run.

Ideally, modules set the message with the reason of the stop so that users are given more detailed info for the reason of the attention set changes that they received a notification for.

TODO(crbug/1251469) - find if this is still needed, once all the places are update to specify the reason of cancellation.

Variables

This section is empty.

Functions

func FormatCLError

func FormatCLError(ctx context.Context, reason *changelist.CLError, cl *changelist.CL, mode run.Mode, sb *strings.Builder) error

FormatCLError formats 1 CL error by writing it into strings.Builder.

mode should be specified if known.

func OnRunStarted

func OnRunStarted(mode run.Mode) string

OnRunStarted generates a starting message for humans.

func OnRunStartedGerritMessage

func OnRunStartedGerritMessage(r *run.Run, cfg *prjcfg.ConfigGroup, env *common.Env) string

OnRunStartedGerritMessage generates a starting message to be posted on each of the Gerrit CLs involved in the Run.

func SFormatCLError

func SFormatCLError(ctx context.Context, reason *changelist.CLError, cl *changelist.CL, mode run.Mode) (string, error)

SFormatCLError is the same as FormatCLError but returns a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL