tisonkun commented on code in PR #70: URL: https://github.com/apache/pulsar-test-infra/pull/70#discussion_r965721600
########## docbot/action.go: ########## @@ -47,11 +47,16 @@ func NewActionWithClient(ctx context.Context, ac *ActionConfig, client *github.C } } +const ( + openedActionType = "opened" + editedActionType = "edited" +) + func (a *Action) Run(prNumber int, actionType string) error { a.prNumber = prNumber switch actionType { - case "opened", "edited", "labeled", "unlabeled": + case openedActionType, editedActionType: Review Comment: I think we should handle labeled/unlabeled action here to undo unintended editions? For example, if only "doc-not-needed" box is checked and a committer check "doc" label, we should remove it. -- 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