@@ -243,11 +243,11 @@ func ParsePrefixedTitle(prefixedTitle string) (paths []string, title string) { return []string{prefix}, title } paths = strings.Split(prefix, ",") for i := range paths { paths[i] = strings.TrimSpace(paths[i]) if strings.HasPrefix(paths[i], "x/") { // Map "x/..." to "golang.org/x/...". if strings.HasPrefix(paths[i], "x/") || paths[i] == "x" { // Map "x/..." to "golang.org/x/...". paths[i] = "golang.org/" + paths[i] } } return paths, title }
@@ -27,10 +27,14 @@ func TestParsePrefixedTitle(t *testing.T) { }, { // "x/..." refers to "golang.org/x/...". in: "x/path: Issue title.", wantPaths: []string{"golang.org/x/path"}, wantTitle: "Issue title.", }, { // "x" refers to "golang.org/x". in: "x: Issue title.", wantPaths: []string{"golang.org/x"}, wantTitle: "Issue title.", }, { // Multiple comma-separated paths. in: "path1, path2: Issue title.", wantPaths: []string{"path1", "path2"}, wantTitle: "Issue title.", }, { // No path prefix.