tisonkun commented on code in PR #56:
URL: https://github.com/apache/pulsar-test-infra/pull/56#discussion_r945234643


##########
docbot/main.go:
##########
@@ -311,6 +311,11 @@ func (a *Action) onPullRequestOpenedOrEdited() error {
 
        // Add missing label
        if a.config.GetEnableLabelMissing() && checkedCount == 0 {
+               if _, exist := currentLabelsSet[a.config.GetLabelMissing()]; 
exist {
+                       logger.Infoln("Already added missing label.")
+                       return fmt.Errorf("%s", MessageLabelMissing)

Review Comment:
   We should return the error here. Still the pr needs a valid doc label. We 
just skip the create comment step.



##########
docbot/main.go:
##########
@@ -420,6 +425,11 @@ func (a *Action) onPullRequestLabeledOrUnlabeled() error {
 
        // Add missing label
        if a.config.GetEnableLabelMissing() && checkedCount == 0 {
+               if _, exist := currentLabelsSet[a.config.GetLabelMissing()]; 
exist {
+                       logger.Infoln("Already added missing label.")
+                       return fmt.Errorf("%s", MessageLabelMissing)

Review Comment:
   See https://github.com/apache/pulsar-test-infra/pull/56#discussion_r945234643



-- 
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

Reply via email to