Skip to content

Commit c593843

Browse files
CopilotMariusStorhaugCopilot
authored
🩹 [Patch]: Add support for US stamp in GitHub status functions (#463)
This pull request adds support for the `US` stamp to various GitHub status-related scripts and updates the corresponding test cases. The changes ensure that the `US` stamp is included in parameter validation, base URLs, and test coverage. ### Updates to parameter validation: - Added `US` to the `ValidateSet` for the `$Stamp` parameter. * `Get-GitHubScheduledMaintenance` * `Get-GitHubStatus.ps1` * `Get-GitHubStatusComponent` * `Get-GitHubStatusIncident` ### Updates to base URLs * Added the base URL for the `US` stamp (`https://us.githubstatus.com`). ### Updates to test coverage: * Included `US` in the 'Status' test cases to ensure proper validation and functionality for the new stamp. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c15c9f4 commit c593843

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

src/functions/public/Status/Get-GitHubScheduledMaintenance.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
# The stamp to check status for.
5050
[Parameter()]
51-
[ValidateSet('Public', 'Europe', 'Australia')]
51+
[ValidateSet('Public', 'Europe', 'Australia', 'US')]
5252
[string] $Stamp = 'Public'
5353
)
5454

src/functions/public/Status/Get-GitHubStatus.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# The stamp to check status for.
4040
[Parameter()]
41-
[ValidateSet('Public', 'Europe', 'Australia')]
41+
[ValidateSet('Public', 'Europe', 'Australia', 'US')]
4242
[string] $Stamp = 'Public'
4343
)
4444
begin {

src/functions/public/Status/Get-GitHubStatusComponent.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
param(
2525
# The stamp to check status for.
2626
[Parameter()]
27-
[ValidateSet('Public', 'Europe', 'Australia')]
27+
[ValidateSet('Public', 'Europe', 'Australia', 'US')]
2828
[string] $Stamp = 'Public'
2929
)
3030

src/functions/public/Status/Get-GitHubStatusIncident.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# The stamp to check status for.
3939
[Parameter()]
40-
[ValidateSet('Public', 'Europe', 'Australia')]
40+
[ValidateSet('Public', 'Europe', 'Australia', 'US')]
4141
[string] $Stamp = 'Public'
4242
)
4343

src/variables/private/StatusBaseURL.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
Public = 'https://www.githubstatus.com'
33
Europe = 'https://eu.githubstatus.com'
44
Australia = 'https://au.githubstatus.com'
5+
US = 'https://us.githubstatus.com'
56
}

tests/GitHub.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Describe 'GitHub' {
226226
$runnerData | Should -Not -BeNullOrEmpty
227227
}
228228
}
229-
Context 'Status' -ForEach @('Public', 'Europe', 'Australia') {
229+
Context 'Status' -ForEach @('Public', 'Europe', 'Australia', 'US') {
230230
It 'Get-GitHubScheduledMaintenance - Gets scheduled maintenance for <_>' {
231231
{ Get-GitHubScheduledMaintenance -Stamp $_ } | Should -Not -Throw
232232
}

0 commit comments

Comments
 (0)