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
{{ message }}
Repository navigation
refactor(github): extract the connection probe into an internal helper #2674
Move the nested Invoke-ConnectionProbe function out of Connect-MtGitHub and into its own internal GitHub service helper. This follows Merill's optional suggestion on #2633.
The changes should cover the following:
For the helper: Add one function in its own file under powershell/internal/services/github/, using an approved verb and a GitHub-specific name. Pass the request URI, authentication headers and connection used for rate-limit tracking as explicit parameters.
For the connection probes: Route the existing token identity, organization, membership and administration probes through the helper. Preserve the current response and error handling, 30-second connection and operation timeouts, and rate-limit checks before requests and after responses or errors.
For session state: Continue using the same connection object across the probes and carry its cooldown state into the established session.
Impact and importance
This makes the probe's dependencies explicit and keeps the shared request handling in the service directory, consistent with Maester's repository layout. The connection behavior and public API should stay the same.
Alternatives you've considered
Leaving the function nested retains the current behavior. Extracting it is a small follow-up to the merged transport work and can be reviewed independently.
Validation
Run the affected connection and rate-limit unit tests with Pester 5.7.1. Verify successful connection, blocking probe failures and non-blocking administration-probe failures, including retained cooldown state.
Adjust or add focused coverage where needed to verify the helper receives the headers and shared connection state.
Run changed-file PSScriptAnalyzer, module build/output validation and ./powershell/tests/pester.ps1 before pushing. Report any baseline or environment failures separately.
Additional context
#2633 is merged. The GraphQL description clarification from the same review has already been added; this issue tracks the helper extraction.
Activity
thetechgy commentedon Nov 4, 2026
I'll take care of this this week