Add missing TODO comments for featuredetection if-statements#12701
Merged
Add missing TODO comments for featuredetection if-statements#12701
Conversation
Add greppable TODO identifiers above all if-statements that reference featuredetection struct fields, as required by the featuredetection linter. This ensures every feature detection branch is tagged for future cleanup when GHES gains support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds TODO comments above all feature detection if-statements to ensure compliance with a new featuredetection linter. The changes are purely additive, placing greppable TODO identifiers directly above 18 if-statements that check featuredetection struct fields across 13 files. This enables future cleanup when GHES versions gain full support for these features.
Changes:
- Added 18 TODO comments following the format
// TODO <cleanupIdentifier>above feature detection checks - Used 6 different cleanup identifiers based on the feature type:
stateReasonCleanup,actorIsAssignableCleanup,advancedIssueSearchCleanup,mergeQueueCleanup,immutableReleaseFullSupport, andrepoFeaturesCleanup - Ensures all feature detection branches are tagged for eventual removal when GHES support catches up
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/search/searcher.go | Added TODO for AdvancedIssueSearchAPIOptIn check |
| pkg/cmd/repo/list/list.go | Added TODO for VisibilityField check |
| pkg/cmd/repo/edit/edit.go | Added TODOs for VisibilityField and AutoMerge checks |
| pkg/cmd/release/list/http.go | Added TODO for ImmutableReleases check |
| pkg/cmd/pr/shared/finder.go | Added TODO for MergeQueue check |
| pkg/cmd/pr/list/http.go | Added TODOs for AdvancedIssueSearchAPI and OptIn checks |
| pkg/cmd/pr/edit/edit.go | Added TODOs for three ActorIsAssignable checks |
| pkg/cmd/issue/shared/lookup.go | Added TODO for StateReason check |
| pkg/cmd/issue/list/list.go | Added TODO for StateReason check |
| pkg/cmd/issue/list/http.go | Added TODOs for AdvancedIssueSearchAPI and OptIn checks |
| pkg/cmd/issue/edit/edit.go | Added TODO for ActorIsAssignable check |
| pkg/cmd/issue/create/create.go | Added TODO for ActorIsAssignable check |
| pkg/cmd/issue/close/close.go | Added TODO for StateReason check |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
babakks
approved these changes
Feb 16, 2026
Comment on lines
+167
to
171
| // TODO advancedIssueSearchCleanup | ||
| if features.AdvancedIssueSearchAPI { | ||
| variables["query"] = prShared.SearchQueryBuild(filters, true) | ||
| // TODO advancedIssueSearchCleanup | ||
| if features.AdvancedIssueSearchAPIOptIn { |
Member
There was a problem hiding this comment.
The second one is redundant, though.
Comment on lines
+78
to
82
| // TODO advancedIssueSearchCleanup | ||
| if features.AdvancedIssueSearchAPI { | ||
| variables["q"] = prShared.SearchQueryBuild(filters, true) | ||
| // TODO advancedIssueSearchCleanup | ||
| if features.AdvancedIssueSearchAPIOptIn { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds greppable TODO identifiers above all if-statements that reference featuredetection struct fields, as required by the featuredetection linter introduced in kw/fd-linter-poc.
All 18 violations fixed across 11 files. The TODO identifiers used are:
stateReasonCleanup:StateReasonchecks (3 sites)actorIsAssignableCleanup:ActorIsAssignablechecks (5 sites)advancedIssueSearchCleanup:AdvancedIssueSearchAPI/OptInchecks (5 sites)mergeQueueCleanup:MergeQueuecheck (1 site)immutableReleaseFullSupport:ImmutableReleasescheck (1 site, moved closer)repoFeaturesCleanup:VisibilityField/AutoMergechecks (3 sites)