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
Open
Labels
Builders x/build issues (builders, bots, dashboards) Documentation NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@myitcv
Copy link
Member

myitcv 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
@gopherbot gopherbot added Builders x/build issues (builders, bots, dashboards) Documentation labels Mar 29, 2019
@ALTree
Copy link
Member

ALTree commented Mar 29, 2019

gopherbot added Documentation label 2 hours ago

Well, there it is.

@andybons andybons added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 3, 2019
codebien pushed a commit to codebien/build that referenced this issue Jun 14, 2019
Documentation word is more specific than document to match issues related to Documentation.

Fixes golang/go#31153
@gopherbot
Copy link
Contributor

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
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
Labels
Builders x/build issues (builders, bots, dashboards) Documentation NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants