Do not request classic projects for non-GHES hosts#10785
Closed
williammartin wants to merge 1 commit intotrunkfrom
Closed
Do not request classic projects for non-GHES hosts#10785williammartin wants to merge 1 commit intotrunkfrom
williammartin wants to merge 1 commit intotrunkfrom
Conversation
9f95187 to
bcfde2c
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new detector interface (fd.Detector) for feature detection and propagates it to issue-related commands and tests to correctly handle Projects v1 support for non‐GHES hosts.
- Updates include adding the Detector field to option structs, updating function signatures (e.g. IssueFromArgWithFields, IssuesFromArgsWithFields, findIssueOrPR, etc.) to accept a detector, and propagating detector usage into various commands and tests.
- Test cases have been updated to use EnabledDetectorMock where appropriate.
Reviewed Changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cmd/issue/transfer/transfer.go | Added detector parameter to transfer logic |
| pkg/cmd/issue/shared/lookup.go | Updated IssueFromArgWithFields, IssuesFromArgsWithFields and findIssueOrPR with the detector parameter |
| pkg/cmd/issue/reopen/reopen.go | Passed nil detector explicitly |
| pkg/cmd/issue/pin/pin.go | Passed nil detector explicitly |
| pkg/cmd/issue/lock/lock.go | Added Detector field and passed it in IssueFromArgWithFields |
| pkg/cmd/issue/edit/edit_test.go & edit/edit.go | Introduced detector initialization and passed it to functions |
| pkg/cmd/issue/develop/develop.go | Passed detector to IssueFromArgWithFields |
| pkg/cmd/issue/delete/delete.go | Passed detector to IssueFromArgWithFields |
| pkg/cmd/issue/create/create_test.go & create/create.go | Added detector to tests and ensured detector is initialized in createRun |
| api/queries_repo_test.go & api/queries_repo.go | Updated function calls to include projectsV1Support parameter |
williammartin
commented
Apr 16, 2025
| return err | ||
| } | ||
|
|
||
| baseRepo, err := opts.BaseRepo() |
Member
Author
There was a problem hiding this comment.
Pretty sure this can't work because BaseRepo will error if the issue is being resolved from a URL.
Member
Author
There was a problem hiding this comment.
➜ workspace ./cli/bin/gh issue edit https://github.com/cli/cli/issues/10797
failed to run git: fatal: not a git repository (or any of the parent directories): .git
Yep.
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.
Description
Fixes #10714
Reviewer Notes
Most of this was pulled from previous work that also adjusted the issue formatters. Currently doing a self-review on that to decide whether to split it into separate PRs.