Skip to content

Commit

Permalink
🔧 [Update]: Refine GitHubConfig initialization messages and remove re…
Browse files Browse the repository at this point in the history
…dundant module imports in tests
  • Loading branch information
MariusStorhaug committed Dec 9, 2024
1 parent e460176 commit 50d6324
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/functions/private/Config/Initialize-GitHubConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
try {
$context = [GitHubConfig](Get-Context -ID $script:GitHub.Config.ID)
if (-not $context -or $Force) {
Write-Verbose "Loading context from defaults"
Write-Verbose "Loading GitHubConfig from defaults"
$context = Set-Context -ID $script:GitHub.DefaultConfig.ID -Context $script:GitHub.DefaultConfig -PassThru
}
$script:GitHub.Config = [GitHubConfig]$context
Expand Down
2 changes: 0 additions & 2 deletions src/loader.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Write-Verbose 'Initializing GitHub PowerShell module...'
Write-Verbose "Path: $scriptFilePath"

Initialize-GitHubConfig

switch ($script:GitHub.EnvironmentType) {
'GHA' {
Write-Verbose 'Detected running on a GitHub Actions runner, preparing environment...'
Expand Down
2 changes: 0 additions & 2 deletions tests/GitHub.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ param()
BeforeAll {
Get-SecretInfo | Remove-Secret
Get-SecretVault | Unregister-SecretVault
Import-Module -Name Context -Force
Import-Module -Name GitHub -Force
}

Describe 'GitHub' {
Expand Down

0 comments on commit 50d6324

Please sign in to comment.