maxsxu commented on code in PR #70: URL: https://github.com/apache/pulsar-test-infra/pull/70#discussion_r966069645
########## docbot/action.go: ########## @@ -130,10 +137,13 @@ func (a *Action) checkLabels() error { for label, checked := range expectedLabelsMap { _, found := prLabels[label] if found { - continue - } - if checked { - labelsToAdd[label] = struct{}{} + if !checked { + labelsToRemove[label] = struct{}{} + } + } else { + if checked { + labelsToAdd[label] = struct{}{} + } Review Comment: Suggest making code more compact: ``` if _, found := prLabels[label]; found && !checked { labelsToRemove[label] = struct{}{} } else if !found && checked { labelsToAdd[label] = struct{}{} } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org