Skip to content

🩹 [Patch]: Remove status function for Australia region (migrated to new reporting type)#548

Open
Copilot wants to merge 14 commits intomainfrom
copilot/remove-status-functions-australia
Open

🩹 [Patch]: Remove status function for Australia region (migrated to new reporting type)#548
Copilot wants to merge 14 commits intomainfrom
copilot/remove-status-functions-australia

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Removes the obsolete Australia region from GitHub Status functions and centralizes stamp definitions into a single $script:GitHub.Stamps property. A new Get-GitHubStamp function 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:StatusBaseURL hashtable into the $script:GitHub.Stamps property, 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-GitHubStamp function

A new public function Get-GitHubStamp exposes the available stamps:

# List all available stamps
Get-GitHubStamp

# Get a specific stamp by name
Get-GitHubStamp -Name 'Europe'

Parameter changes

The -Stamp parameter has been renamed to -Name across all status functions for consistency. The original -Stamp name remains available as an alias for backward compatibility:

# Both of these work
Get-GitHubStatus -Name 'Europe'
Get-GitHubStatus -Stamp 'Europe'  # Alias, still supported

Tab-completion

Status functions now support tab-completion for the -Name parameter via a registered argument completer that reads from Get-GitHubStamp, so completion options stay in sync with the defined stamps automatically.

Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove obsolete status functions for Australia region Remove Australia region from status functions Feb 9, 2026
Copilot AI requested a review from MariusStorhaug February 9, 2026 09:54
@MariusStorhaug
Copy link
Member

@copilot Lets make the validateset smarter for the status functions:

  1. Convert them to Argument Completers using a completers.ps1 file and the "Register-ArgumentCompleter" cmdlet.
  2. Take data from the variable file covering stamps/status.

Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 9, 2026

@copilot Lets make the validateset smarter for the status functions:

  1. Convert them to Argument Completers using a completers.ps1 file and the "Register-ArgumentCompleter" cmdlet.
  2. Take data from...

Done in c6ae5b6. Converted all four status functions to use argument completers that dynamically read from $script:StatusBaseURL instead of static ValidateSet.

Copilot AI changed the title Remove Australia region from status functions Remove Australia region from status functions and convert to argument completers Feb 9, 2026
@MariusStorhaug
Copy link
Member

@copilot As the StatusBaseURL variable is in the private variable, we could instead move it to a public variable, i.e. under the GitHub variable under a Stamps property.

Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 9, 2026

@copilot As the StatusBaseURL variable is in the private variable, we could instead move it to a public variable, i.e. under the GitHub variable under a Stamps property.

Done in 74c8ef6. Moved stamps from private $script:StatusBaseURL variable to public $script:GitHub.Stamps property. Updated all references and deleted the old StatusBaseURL.ps1 file.

Copilot AI changed the title Remove Australia region from status functions and convert to argument completers Remove Australia region from status functions and move stamps to GitHub.Stamps Feb 9, 2026
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copilot AI requested a review from MariusStorhaug February 9, 2026 11:24
@MariusStorhaug MariusStorhaug changed the title Remove Australia region from status functions and move stamps to GitHub.Stamps 🩹 [Patch]: Remove Australia region from status functions Feb 9, 2026
@MariusStorhaug
Copy link
Member

@copilot Fix this slop please:

Error: [-] Avoid trailing whitespace (PSAvoidTrailingWhitespace) 35ms (34ms|1ms)
Message
  Expected $null or empty, because Each line should have no trailing whitespace., but got '
  - Workspace:/src/completers.ps1:L57:C1
  - Workspace:/src/completers.ps1:L61:C1
  - Workspace:/src/completers.ps1:L64:C1
  - Workspace:/src/completers.ps1:L68:C1'.
  at $issues -join '' | Should -BeNullOrEmpty -Because $rule.Description, /home/runner/work/_actions/PSModule/Invoke-ScriptAnalyzer/17bb50ef88b72e7d723e56b81d2e04f27ddc7e37/src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1:145
  at <ScriptBlock>, /home/runner/work/_actions/PSModule/Invoke-ScriptAnalyzer/17bb50ef88b72e7d723e56b81d2e04f27ddc7e37/src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1:145

Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 10, 2026

@copilot Fix this slop please:

...

Fixed in f75a819. Removed trailing whitespace from blank lines 57, 61, 64, and 68 in completers.ps1. PSScriptAnalyzer should now pass.

@MariusStorhaug MariusStorhaug changed the title 🩹 [Patch]: Remove Australia region from status functions 🩹 [Patch]: Remove status function for Australia region (migrated to new reporting type) Feb 12, 2026
@MariusStorhaug MariusStorhaug marked this pull request as ready for review February 12, 2026 07:58
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner February 12, 2026 07:58
Copilot AI review requested due to automatic review settings February 12, 2026 07:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:StatusBaseURL map with $script:GitHub.Stamps (typed GitHubStamp objects).
  • Added Get-GitHubStamp and updated all Status cmdlets to use -Name (with -Stamp as an alias for compatibility).
  • Updated Pester tests and added a status -Name argument 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@github-actions
Copy link
Contributor

✅ New prerelease: PowerShell Gallery - GitHub 0.40.6-copilotremovestatusfunctionsaustralia001

@github-actions
Copy link
Contributor

✅ New prerelease: GitHub - GitHub v0.40.6-copilotremovestatusfunctionsaustralia001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

🩹 [Patch]: Remove status function for Australia region (migrated to new reporting type)

2 participants