You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generic scope ID extraction and remote-scope API client (#115)
* Initial plan
* feat: generic scope ID extraction and remote-scope API client
- Add ScopeIDField and HasRepoScopes to ConnectionDef; set on github/gh-copilot entries
- Replace ScopeListEntry typed struct with json.RawMessage + extractScopeID helper
- Add RemoteScopeChild/RemoteScopeResponse types and ListRemoteScopes/SearchRemoteScopes client methods
- Remove hardcoded if-plugin-github checks from listConnectionScopes, scope list, scope delete
- Add table-driven tests for ExtractScopeID, ScopeListWrapper helpers, and new client methods
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
* fix: ScopeName empty-string fallthrough and deduplicate ScopeFullName call
- ScopeName() now skips empty strings (like ExtractScopeID does), so a
JSON field of "" correctly falls through to the next candidate key
- configure_projects.go: call ScopeFullName() once per scope and reuse
the value for both the display name and repo-tracking check
- Add "empty fullName falls through to name" test case
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
* fix: cache parseScope, ScopeFullName empty-string, ID fallback, pagination test assertions
- ScopeListWrapper gains a shared parseScope() helper with lazy map caching;
ScopeName() and ScopeFullName() now unmarshal RawScope at most once per item
- ScopeFullName() now treats "" as absent (consistent with ScopeName/ExtractScopeID)
- configure_scope_list: deduplicate FindConnectionDef; add scopeIDFor() closure
that falls back to ScopeName() when ExtractScopeID returns ""
- configure_scope_delete: add id=="" fallback to name so interactive delete
always has a usable identifier even when ScopeIDField payload is missing
- TestSearchRemoteScopes: assert page, pageSize, and search query params are
sent when non-zero and absent when zero
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
0 commit comments