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 <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/cmd/gopherbot/gopherbot.go b/cmd/gopherbot/gopherbot.go
index 7131da8..48858d2 100644
--- a/cmd/gopherbot/gopherbot.go
+++ b/cmd/gopherbot/gopherbot.go
@@ -1802,22 +1802,22 @@
}
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
}