Fix list_issues on GHES schemas without issue fields - #3086
Conversation
|
Reviewed the branch locally and ran 1. Exact string matching is likely too narrow (main concern)
Since the fallback is cheap and safe (any genuine failure resurfaces from the retry), a permissive match seems strictly better: func isUnsupportedListIssuesIssueFieldsError(err error) bool {
msg := err.Error()
return strings.Contains(msg, "IssueFieldValueFilter") || strings.Contains(msg, "issueFieldValues")
}2. Retry error masks the originalIf the fallback query fails for an unrelated reason (rate limit, auth), the user only sees that error and never learns the primary query hit a schema gap. Consider joining both messages. 3. Result extraction via type switch is fragileThe fallback branch already knows the concrete shape, so setting 4. The duplicated structs look avoidableAnonymous untagged fields are inlined by the library in both query construction ( 5. Two round trips per call on GHESIncluding every pagination page. A per-client memo of "this schema doesn't support issue fields" would avoid the repeated probe — fine as a follow-up. 6. Scope gap
Nit: |
80fc69b to
5249762
Compare
Retry list_issues without custom issue field dependencies only when the host schema lacks them. Preserve explicit field filters and propagate unrelated GraphQL errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Handle alternate issue-field validation messages, preserve primary and retry errors, and avoid runtime result type switches. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
5249762 to
1acc2a0
Compare
Summary
IssueFieldValueFilterandIssue.issueFieldValuesquery on supported GitHub.com, GHEC, and GHES schemasfield_filtersand propagate unrelated GraphQL failuresValidation
script/lintscript/testFixes #3068