String returns the string representation of the query which can be used with the legacy search backend, which is used in global search GUI (i.e. github.com/search), or Pull Requests tab (in repositories). Note that this is a common query format that can be used to search for various entity types (e.
()
| 117 | // At the moment, the advanced search syntax is only available for searching |
| 118 | // issues, and it's called advanced issue search. |
| 119 | func (q Query) StandardSearchString() string { |
| 120 | qualifiers := formatQualifiers(q.Qualifiers, nil) |
| 121 | var keywords []string |
| 122 | if q.ImmutableKeywords != "" { |
| 123 | keywords = []string{q.ImmutableKeywords} |
| 124 | } else if ks := formatKeywords(q.Keywords); len(ks) > 0 { |
| 125 | keywords = ks |
| 126 | } |
| 127 | all := append(keywords, qualifiers...) |
| 128 | return strings.TrimSpace(strings.Join(all, " ")) |
| 129 | } |
| 130 | |
| 131 | // AdvancedIssueSearchString returns the string representation of the query |
| 132 | // compatible with the advanced issue search syntax. The query can be used in |