Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ updates:
directory: / # Location of package manifests
schedule:
interval: weekly
- package-ecosystem: nuget # See documentation for possible values
directory: / # Location of package manifests
schedule:
interval: weekly
4 changes: 3 additions & 1 deletion .github/workflows/Nightly-Run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ on:

permissions:
contents: read
pull-requests: write
statuses: write

jobs:
Process-PSModule:
uses: PSModule/Process-PSModule/.github/workflows/CI.yml@v2
uses: PSModule/Process-PSModule/.github/workflows/CI.yml@v3
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/Process-PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ permissions:

jobs:
Process-PSModule:
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v2
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v3
secrets: inherit
with:
SkipTests: Desktop
SkipTests: SourceCode
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
$tokenVar = Get-ChildItem -Path 'Env:' | Where-Object Name -In 'GH_TOKEN', 'GITHUB_TOKEN' | Select-Object -First 1 -ExpandProperty Value
$tokenVarPresent = $tokenVar.count -gt 0 -and -not [string]::IsNullOrEmpty($tokenVar)
if ($tokenVarPresent) {
Connect-GitHubAccount -Repo $env:GITHUB_REPOSITORY_NAME -Owner $env:GITHUB_REPOSITORY_OWNER
Connect-GitHubAccount -Repo $env:GITHUB_REPOSITORY_NAME -Owner $env:GITHUB_REPOSITORY_OWNER -ApiBaseUri $env:GITHUB_API_URL
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@
[Alias('Repository')]
[string] $Repo,

# API host used for API requests.
[Parameter()]
[Alias('BaseURL')]
[string] $ApiBaseUri = 'https://api.github.com',

# API version used for API requests.
[Parameter()]
[string] $ApiVersion = '2022-11-28',

# Suppresses the output of the function.
[Parameter()]
[Alias('Quiet')]
Expand Down Expand Up @@ -154,8 +163,8 @@
AccessToken = ConvertTo-SecureString -AsPlainText $tokenResponse.access_token
AccessTokenExpirationDate = (Get-Date).AddSeconds($tokenResponse.expires_in)
AccessTokenType = $tokenResponse.access_token -replace '_.*$', '_*'
ApiBaseUri = 'https://api.github.com'
ApiVersion = '2022-11-28'
ApiBaseUri = $ApiBaseUri
ApiVersion = $ApiVersion
AuthType = $AuthType
DeviceFlowType = $Mode
RefreshToken = ConvertTo-SecureString -AsPlainText $tokenResponse.refresh_token
Expand All @@ -167,8 +176,8 @@
$settings = @{
AccessToken = ConvertTo-SecureString -AsPlainText $tokenResponse.access_token
AccessTokenType = $tokenResponse.access_token -replace '_.*$', '_*'
ApiBaseUri = 'https://api.github.com'
ApiVersion = '2022-11-28'
ApiBaseUri = $ApiBaseUri
ApiVersion = $ApiVersion
AuthType = $AuthType
DeviceFlowType = $Mode
Scope = $tokenResponse.scope
Expand All @@ -192,8 +201,8 @@
$settings = @{
AccessToken = $accessTokenValue
AccessTokenType = $accessTokenType
ApiBaseUri = 'https://api.github.com'
ApiVersion = '2022-11-28'
ApiBaseUri = $ApiBaseUri
ApiVersion = $ApiVersion
AuthType = $AuthType
}
Set-GitHubConfig @settings
Expand All @@ -206,8 +215,8 @@
$settings = @{
AccessToken = ConvertTo-SecureString -AsPlainText $gitHubToken
AccessTokenType = $prefix
ApiBaseUri = 'https://api.github.com'
ApiVersion = '2022-11-28'
ApiBaseUri = $ApiBaseUri
ApiVersion = $ApiVersion
AuthType = 'sPAT'
}
Set-GitHubConfig @settings
Expand Down
14 changes: 1 addition & 13 deletions tests/Commands.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Commands' {
Describe 'Commands' {
It "Start-LogGroup 'MyGroup' should not throw" {
{
Start-LogGroup 'MyGroup'
Expand All @@ -28,6 +19,3 @@ Describe 'Commands' {
} | Should -Not -Throw
}
}



11 changes: 1 addition & 10 deletions tests/GitHub.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

BeforeAll {
BeforeAll {
Connect-GitHub
}

Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Auth/Connect-GitHubAccount.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Connect-GitHubAccount' {
Describe 'Connect-GitHubAccount' {
It 'Function exists' {
Get-Command Connect-GitHubAccount | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Auth/Disconnect-GitHubAccount.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Disconnect-GitHubAccount' {
Describe 'Disconnect-GitHubAccount' {
It 'Function exists' {
Get-Command Disconnect-GitHubAccount | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Get-GitHubRepository.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Get-GitHubRepository' {
Describe 'Get-GitHubRepository' {
It 'Function exists' {
Get-Command Get-GitHubRepository | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Status/Get-GitHubScheduledMaintenance.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Get-GitHubScheduledMaintenance' {
Describe 'Get-GitHubScheduledMaintenance' {
It 'Function exists' {
Get-Command Get-GitHubScheduledMaintenance | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Status/Get-GitHubStatus.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Get-GitHubStatus' {
Describe 'Get-GitHubStatus' {
It 'Function exists' {
Get-Command Get-GitHubStatus | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Status/Get-GitHubStatusComponent.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Get-GitHubStatusComponent' {
Describe 'Get-GitHubStatusComponent' {
It 'Function exists' {
Get-Command Get-GitHubStatusComponent | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/GitHub/Status/Get-GitHubStatusIncident.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Get-GitHubStatusIncident' {
Describe 'Get-GitHubStatusIncident' {
It 'Function exists' {
Get-Command Get-GitHubStatusIncident | Should -Not -BeNullOrEmpty
}
Expand Down
11 changes: 1 addition & 10 deletions tests/Rate-Limit/Get-GitHubRateLimit.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Get-GitHubRateLimit' {
Describe 'Get-GitHubRateLimit' {
It 'Function exists' {
Get-Command Get-GitHubRateLimit | Should -Not -BeNullOrEmpty
}
Expand Down