Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
myitcv opened this issue Mar 29, 2019 · 2 comments · May be fixed by golang/build#21

Comments

@myitcv
Copy link
Member

commented Mar 29, 2019

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 #31150 which has the title:

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

@gopherbot gopherbot added this to the Unreleased milestone Mar 29, 2019

@ALTree

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

gopherbot added Documentation label 2 hours ago

Well, there it is.

@andybons andybons added the NeedsFix label Apr 3, 2019

codebien pushed a commit to codebien/build that referenced this issue Jun 14, 2019
Ivan Palladino
gopherbot: relaxed matching rule for the documentation label
Documentation word is more specific than document to match issues related to Documentation.

Fixes golang/go#31153
@gopherbot

This comment has been minimized.

Copy link

commented Jun 14, 2019

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

codebien pushed a commit to codebien/build that referenced this issue Jun 15, 2019
Ivan Palladino
cmd/gopherbot: match just the whole word document
When the title contains the word document then
repeat the check with a regex word boundaries rule then
return positive just in case of a whole word match.

Updates golang/go#31153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.