fix(featuredetection): remove redundant AdvancedIssueSearchWebInIssuesTab field
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
43bedab2dc
commit
37896d613a
2 changed files with 8 additions and 14 deletions
|
|
@ -64,9 +64,6 @@ type SearchFeatures struct {
|
|||
// issue search as an opt-in feature, which has to be explicitly enabled in
|
||||
// API calls.
|
||||
AdvancedIssueSearchAPIOptIn bool
|
||||
// AdvancedIssueSearchWebInIssuesTab indicates whether the host supports
|
||||
// advanced issue search syntax in the Issues tab of repositories.
|
||||
AdvancedIssueSearchWebInIssuesTab bool
|
||||
|
||||
// TODO advancedSearchFuture
|
||||
// When advanced issue search is supported in Pull Requests tab, or in
|
||||
|
|
@ -84,18 +81,16 @@ var advancedIssueSearchNotSupported = SearchFeatures{
|
|||
// the full cleanup of temp types (i.e. ISSUE_ADVANCED search type is still
|
||||
// present on the schema).
|
||||
var advancedIssueSearchSupportedAsOptIn = SearchFeatures{
|
||||
AdvancedIssueSearchAPI: true,
|
||||
AdvancedIssueSearchAPIOptIn: true,
|
||||
AdvancedIssueSearchWebInIssuesTab: true,
|
||||
AdvancedIssueSearchAPI: true,
|
||||
AdvancedIssueSearchAPIOptIn: true,
|
||||
}
|
||||
|
||||
// advancedIssueSearchSupportedAsOnlyBackend mimics github.com and GHE >=3.18
|
||||
// after the full cleanup of temp types (i.e. ISSUE_ADVANCED search type is
|
||||
// removed from the schema).
|
||||
var advancedIssueSearchSupportedAsOnlyBackend = SearchFeatures{
|
||||
AdvancedIssueSearchAPI: true,
|
||||
AdvancedIssueSearchAPIOptIn: false,
|
||||
AdvancedIssueSearchWebInIssuesTab: true,
|
||||
AdvancedIssueSearchAPI: true,
|
||||
AdvancedIssueSearchAPIOptIn: false,
|
||||
}
|
||||
|
||||
type detector struct {
|
||||
|
|
@ -317,7 +312,6 @@ func (d *detector) SearchFeatures() (SearchFeatures, error) {
|
|||
// As of August 2025, advanced issue search is going to be available
|
||||
// on GHES 3.18+, including Issues tabs in repositories.
|
||||
feature.AdvancedIssueSearchAPI = true
|
||||
feature.AdvancedIssueSearchWebInIssuesTab = true
|
||||
|
||||
// TODO advancedSearchFuture
|
||||
// When the advanced search syntax is supported in global search or
|
||||
|
|
@ -328,7 +322,6 @@ func (d *detector) SearchFeatures() (SearchFeatures, error) {
|
|||
// As of August 2025, advanced issue search is available on github.com,
|
||||
// including Issues tabs in repositories.
|
||||
feature.AdvancedIssueSearchAPI = true
|
||||
feature.AdvancedIssueSearchWebInIssuesTab = true
|
||||
|
||||
// TODO advancedSearchFuture
|
||||
// When the advanced search syntax is supported in global search or
|
||||
|
|
|
|||
|
|
@ -181,10 +181,11 @@ func listRun(opts *ListOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
advancedSyntaxSupported := searchFeatures.AdvancedIssueSearchAPI && searchFeatures.AdvancedIssueSearchWebInIssuesTab
|
||||
|
||||
issueListURL := ghrepo.GenerateRepoURL(baseRepo, "issues")
|
||||
openURL, err := prShared.ListURLWithQuery(issueListURL, filterOptions, advancedSyntaxSupported)
|
||||
|
||||
// Note that if the advanced issue search API is available, the syntax is
|
||||
// also supported in the Issues tab.
|
||||
openURL, err := prShared.ListURLWithQuery(issueListURL, filterOptions, searchFeatures.AdvancedIssueSearchAPI)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue