Skip to content

Remove US stamp from GitHub Status endpoints #580

@MariusStorhaug

Description

Context

The module includes support for querying the GitHub Status API through three regional
"stamps": Public, Europe, and US. These stamps are defined in the module's initialization and used by the status
functions (Get-GitHubStatus, Get-GitHubScheduledMaintenance, Get-GitHubStatusComponent, Get-GitHubStatusIncident)
via the -Name parameter and Get-GitHubStamp.

Request

The US stamp (https://us.githubstatus.com) no longer exists. All API calls to this base URL return
404 (Not Found), causing 8 test failures in CI:

  • Get-GitHubScheduledMaintenance — scheduled, active, and upcoming maintenance queries for US
  • Get-GitHubStatus — all status and summary status queries for US
  • Get-GitHubStatusComponent — component status query for US
  • Get-GitHubStatusIncident — all incidents and unresolved incidents queries for US
Full test failure output
Error: [-] Get-GitHubScheduledMaintenance - Gets scheduled maintenance for US 448ms (447ms|1ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubScheduledMaintenance - Gets active maintenance for US 318ms (317ms|0ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubScheduledMaintenance - Gets upcoming maintenance for US 329ms (328ms|0ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubStatus - Gets all status for US 341ms (340ms|1ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubStatus - Gets summary status for US 419ms (418ms|1ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubStatusComponent - Gets the status of GitHub components for US 248ms (247ms|1ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubStatusIncident - Gets the status of all GitHub incidents for US 255ms (254ms|1ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Error: [-] Get-GitHubStatusIncident - Gets the status of unresolved GitHub incidents for US 371ms (370ms|1ms)
  Expected no exception to be thrown, but an exception "Response status code does not indicate success: 404 (Not Found)." was thrown

Acceptance criteria

  • The US stamp is no longer registered in the module
  • All status functions continue to work for Public and Europe stamps
  • CI tests pass without the 8 US-related test failures
  • Tab-completion no longer offers US as a stamp name

Technical decisions

Root cause: The US stamp is defined in src/variables/private/GitHub.ps1 as
[GitHubStamp]::new('US', 'https://us.githubstatus.com'). The URL https://us.githubstatus.com is no longer served
by GitHub and returns 404 on all API endpoints.

Fix scope: Remove the single line that registers the US stamp. No changes are needed to the status functions
themselves — they dynamically resolve stamps via Get-GitHubStamp, so removing the stamp entry is sufficient. The
parametrized test in GitHub.Tests.ps1 iterates over Get-GitHubStamp output, so the US test cases will
automatically disappear once the stamp is removed.

No breaking change: The US stamp has been non-functional (404), so removing it does not break any working
functionality. Any user currently passing -Name US is already getting errors.


Implementation plan

Core changes

  • Remove the [GitHubStamp]::new('US', 'https://us.githubstatus.com') line from src/variables/private/GitHub.ps1

Verification

  • Confirm the parametrized status tests pass for Public and Europe stamps
  • Confirm Get-GitHubStamp returns only Public and Europe

Metadata

Metadata

Labels

bugSomething isn't workingpatch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions