From d1ab7ac8e2c8abfb70534c7c684d493f8e053f0a Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 7 Oct 2020 15:11:12 -0400 Subject: [PATCH] cmd/gopherbot: rename a function to be more descriptive labelChangeDisallowed is closer to what this function is meant for. Change-Id: I64b143263df2d3dca018f9daecd73c2be59e84c9 Reviewed-on: https://go-review.googlesource.com/c/build/+/260417 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: Go Bot Reviewed-by: Dmitri Shuralyov --- cmd/gopherbot/gopherbot.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/gopherbot/gopherbot.go b/cmd/gopherbot/gopherbot.go index 7131da81..48858d26 100644 --- a/cmd/gopherbot/gopherbot.go +++ b/cmd/gopherbot/gopherbot.go @@ -1802,22 +1802,22 @@ func mutationsFromCommands(cmds []labelCommand) (add, remove []string) { } for l := range toAdd { - if toAdd[l] && !labelChangeBlacklisted(l, "add") { + if toAdd[l] && !labelChangeDisallowed(l, "add") { add = append(add, l) } } for l := range toRemove { - if toRemove[l] && !labelChangeBlacklisted(l, "remove") { + if toRemove[l] && !labelChangeDisallowed(l, "remove") { remove = append(remove, l) } } return add, remove } -// labelChangeBlacklisted returns true if an action on the given label is +// labelChangeDisallowed reports whether an action on the given label is // forbidden via gopherbot. -func labelChangeBlacklisted(label, action string) bool { +func labelChangeDisallowed(label, action string) bool { if action == "remove" && label == "Security" { return true }