about summary refs log tree commit diff
path: root/fun/clbot/clbot.go
diff options
context:
space:
mode:
Diffstat (limited to 'fun/clbot/clbot.go')
-rw-r--r--fun/clbot/clbot.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/fun/clbot/clbot.go b/fun/clbot/clbot.go
index c259987a52d2..e5a5990ef25a 100644
--- a/fun/clbot/clbot.go
+++ b/fun/clbot/clbot.go
@@ -40,6 +40,8 @@ var (
 
 	notifyRepo     = flag.String("notify_repo", "depot", "Repo name to notify about")
 	notifyBranches = stringSetFlag{}
+
+	neverPing = flag.String("never_ping", "marcus", "Comma-separated terms that should never ping users")
 )
 
 func init() {
@@ -181,7 +183,13 @@ func noping(user string) string {
 // message. With this users will not be pinged for their own CLs, but
 // they will be notified if someone else writes a CL that includes
 // their username.
+//
+// Also applies noping to all instances of the words in `neverPing`.
 func nopingAll(username, message string) string {
+	for _, word := range strings.Split(*neverPing, ",") {
+		message = strings.ReplaceAll(message, word, noping(word))
+	}
+
 	return strings.ReplaceAll(message, username, noping(username))
 }