Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/cmd/issue/close/close.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func apiClose(httpClient *http.Client, repo ghrepo.Interface, issue *api.Issue,
if err != nil {
return err
}
// TODO stateReasonCleanup
if !features.StateReason {
// If StateReason is not supported silently close issue without setting StateReason.
reason = ""
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/issue/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func createRun(opts *CreateOptions) (err error) {
return err
}

// TODO actorIsAssignableCleanup
if issueFeatures.ActorIsAssignable {
assignees = copilotReplacer.ReplaceSlice(assignees)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/issue/edit/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ func editRun(opts *EditOptions) error {

lookupFields := []string{"id", "number", "title", "body", "url"}
if editable.Assignees.Edited {
// TODO actorIsAssignableCleanup
if issueFeatures.ActorIsAssignable {
editable.Assignees.ActorAssignees = true
lookupFields = append(lookupFields, "assignedActors")
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/issue/list/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ func searchIssues(client *api.Client, detector fd.Detector, repo ghrepo.Interfac
filters.Repo = ghrepo.FullName(repo)
filters.Entity = "issue"

// TODO advancedIssueSearchCleanup
if features.AdvancedIssueSearchAPI {
variables["query"] = prShared.SearchQueryBuild(filters, true)
// TODO advancedIssueSearchCleanup
if features.AdvancedIssueSearchAPIOptIn {
variables["type"] = "ISSUE_ADVANCED"
} else {
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/issue/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func listRun(opts *ListOptions) error {
return err
}
fields := defaultFields
// TODO stateReasonCleanup
if features.StateReason {
fields = append(defaultFields, "stateReason")
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/issue/shared/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func FindIssueOrPR(httpClient *http.Client, repo ghrepo.Interface, number int, f
if err != nil {
return nil, err
}
// TODO stateReasonCleanup
if !features.StateReason {
fieldSet.Remove("stateReason")
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/pr/edit/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func editRun(opts *EditOptions) error {
return err
}

// TODO actorIsAssignableCleanup
if issueFeatures.ActorIsAssignable {
findOptions.Fields = append(findOptions.Fields, "assignedActors")
} else {
Expand All @@ -269,6 +270,7 @@ func editRun(opts *EditOptions) error {
editable.Base.Default = pr.BaseRefName
editable.Reviewers.Default = pr.ReviewRequests.DisplayNames()
editable.Reviewers.DefaultLogins = pr.ReviewRequests.Logins()
// TODO actorIsAssignableCleanup
if issueFeatures.ActorIsAssignable {
editable.Assignees.ActorAssignees = true
editable.Assignees.Default = pr.AssignedActors.DisplayNames()
Expand Down Expand Up @@ -299,6 +301,7 @@ func editRun(opts *EditOptions) error {
// Wire up search functions for assignees and reviewers.
// When these aren't wired up, it triggers a downstream fallback
// to legacy reviewer/assignee fetching.
// TODO actorIsAssignableCleanup
if issueFeatures.ActorIsAssignable {
editable.AssigneeSearchFunc = assigneeSearchFunc(apiClient, repo, &editable, pr.ID)
editable.ReviewerSearchFunc = reviewerSearchFunc(apiClient, repo, &editable, pr.ID)
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/pr/list/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ func searchPullRequests(httpClient *http.Client, detector fd.Detector, repo ghre
filters.Repo = ghrepo.FullName(repo)
filters.Entity = "pr"

// TODO advancedIssueSearchCleanup
if features.AdvancedIssueSearchAPI {
variables["q"] = prShared.SearchQueryBuild(filters, true)
// TODO advancedIssueSearchCleanup
if features.AdvancedIssueSearchAPIOptIn {
variables["type"] = "ISSUE_ADVANCED"
} else {
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/pr/shared/finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ func (f *finder) Find(opts FindOptions) (*api.PullRequest, ghrepo.Interface, err
if err != nil {
return nil, nil, err
}
// TODO mergeQueueCleanup
if !prFeatures.MergeQueue {
fields.Remove("isInMergeQueue")
fields.Remove("isMergeQueueEnabled")
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/release/list/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func fetchReleases(httpClient *http.Client, repo ghrepo.Interface, limit int, ex
// `@skip(condition)` here because if the field doesn't exist on the schema
// then the whole query would still fail regardless of the condition being
// met or not.
// TODO immutableReleaseFullSupport
if !releaseFeatures.ImmutableReleases {
return fetchReleasesWithoutImmutableReleases(httpClient, repo, limit, excludeDrafts, excludePreReleases, order)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/repo/edit/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ func editRun(ctx context.Context, opts *EditOptions) error {
"squashMergeAllowed",
"watchers",
}
// TODO repoFeaturesCleanup
if repoFeatures.VisibilityField {
fieldsToRetrieve = append(fieldsToRetrieve, "visibility")
}
// TODO repoFeaturesCleanup
if repoFeatures.AutoMerge {
fieldsToRetrieve = append(fieldsToRetrieve, "autoMergeAllowed")
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/repo/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func listRun(opts *ListOptions) error {
}

fields := defaultFields
// TODO repoFeaturesCleanup
if features.VisibilityField {
fields = append(defaultFields, "visibility")
}
Expand Down
1 change: 1 addition & 0 deletions pkg/search/searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func (s searcher) search(query Query, result interface{}) (string, error) {
} else {
qs.Set("q", query.AdvancedIssueSearchString())

// TODO advancedIssueSearchCleanup
if features.AdvancedIssueSearchAPIOptIn {
// Advanced syntax should be explicitly enabled
qs.Set("advanced_search", "true")
Expand Down
Loading