🩹 [Patch]: Remove status function for Australia region (migrated to new reporting type)#548
🩹 [Patch]: Remove status function for Australia region (migrated to new reporting type)#548
Conversation
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
|
@copilot Lets make the validateset smarter for the status functions:
|
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Done in c6ae5b6. Converted all four status functions to use argument completers that dynamically read from |
|
@copilot As the |
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Done in 74c8ef6. Moved stamps from private |
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
|
@copilot Fix this slop please: |
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
…e parameter names for consistency
…ithub.com/PSModule/GitHub into copilot/remove-status-functions-australia
… output formatting
There was a problem hiding this comment.
Pull request overview
This PR updates the module’s GitHub Status support by removing the obsolete Australia region and switching status commands to use a centralized “stamp” list exposed via a new Get-GitHubStamp function (including tab completion).
Changes:
- Removed the Australia stamp and replaced the old
$script:StatusBaseURLmap with$script:GitHub.Stamps(typedGitHubStampobjects). - Added
Get-GitHubStampand updated all Status cmdlets to use-Name(with-Stampas an alias for compatibility). - Updated Pester tests and added a status
-Nameargument completer.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/GitHub.Tests.ps1 | Adds tests for Get-GitHubStamp and iterates Status tests over discovered stamps. |
| src/variables/private/StatusBaseURL.ps1 | Removes the legacy base-URL hashtable (including Australia). |
| src/variables/private/GitHub.ps1 | Introduces $script:GitHub.Stamps as the centralized stamp list. |
| src/functions/public/Status/Get-GitHubStatusIncident.ps1 | Switches from -Stamp+ValidateSet to -Name (alias Stamp) and resolves BaseUrl via Get-GitHubStamp. |
| src/functions/public/Status/Get-GitHubStatusComponent.ps1 | Same parameter + BaseUrl resolution change as above. |
| src/functions/public/Status/Get-GitHubStatus.ps1 | Same parameter + BaseUrl resolution change as above. |
| src/functions/public/Status/Get-GitHubStamp.ps1 | New public API to list/lookup stamps. |
| src/functions/public/Status/Get-GitHubScheduledMaintenance.ps1 | Same parameter + BaseUrl resolution change as above. |
| src/completers.ps1 | Adds tab completion for the -Name parameter on status cmdlets. |
| src/classes/public/GitHubStamp.ps1 | Adds a typed object representing a stamp (Name/BaseUrl). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…umentation; remove deprecated status functions for Australia
|
✅ New prerelease: PowerShell Gallery - GitHub 0.40.6-copilotremovestatusfunctionsaustralia001 |
|
✅ New prerelease: GitHub - GitHub v0.40.6-copilotremovestatusfunctionsaustralia001 |
…tegories in PSModule.yml
Removes the obsolete Australia region from GitHub Status functions and centralizes stamp definitions into a single
$script:GitHub.Stampsproperty. A newGet-GitHubStampfunction provides a public API for listing and retrieving available stamps, and all status functions now use it as their single source of truth.Removed Australia region
The Australia status page (
https://au.githubstatus.com) has been migrated to a new reporting type and is no longer available through the GitHub Status API. All status functions have been updated to remove Australia from the available stamps.Centralized stamp definitions
Stamp definitions have been moved from a standalone
$script:StatusBaseURLhashtable into the$script:GitHub.Stampsproperty, making them part of the main module configuration object. This provides a single source of truth for all stamp-related logic across functions, completers, and tests.New
Get-GitHubStampfunctionA new public function
Get-GitHubStampexposes the available stamps:Parameter changes
The
-Stampparameter has been renamed to-Nameacross all status functions for consistency. The original-Stampname remains available as an alias for backward compatibility:Tab-completion
Status functions now support tab-completion for the
-Nameparameter via a registered argument completer that reads fromGet-GitHubStamp, so completion options stay in sync with the defined stamps automatically.