Go: x/build/cmd/gopherbot: too aggressive for issue titles that contain the word "document"

Created on 29 Mar 2019  路  2Comments  路  Source: golang/go

gopherbot is too aggressive when it comes to identifying issues to be labelled "documentation":

func isDocumentationTitle(t string) bool {
    if !strings.Contains(t, "doc") && !strings.Contains(t, "Doc") {
        return false
    }
    t = strings.ToLower(t)
    if strings.HasPrefix(t, "doc:") {
        return true
    }
    if strings.HasPrefix(t, "docs:") {
        return true
    }
    if strings.HasPrefix(t, "cmd/doc:") {
        return false
    }
    if strings.HasPrefix(t, "go/doc:") {
        return false
    }
    if strings.Contains(t, "godoc:") { // in x/tools, or the dozen places people file it as
        return false
    }
    return strings.Contains(t, "document") ||
        strings.Contains(t, "docs ")
}

This came to light with https://github.com/golang/go/issues/31150 which has the title:

x/tools/cmd/gopls: textDocument/rangeFormatting gives error "ToUTF16Column: point is missing offset"
Builders Documentation NeedsFix

Most helpful comment

gopherbot added Documentation label 2 hours ago

Well, there it is.

All 2 comments

gopherbot added Documentation label 2 hours ago

Well, there it is.

Change https://golang.org/cl/182419 mentions this issue: cmd/gopherbot: relaxed matching rule for the documentation label

Was this page helpful?
0 / 5 - 0 ratings