File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed
Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,12 @@ try {
1616 Get-InstalledPSResource | Select-Object Name, Version, Prerelease | Sort-Object - Property Name | Format-Table - AutoSize
1717 }
1818
19- LogGroup ' - GitHub connection' {
20- if ($providedClientID -and $providedPrivateKey ) {
21- Connect-GitHub - ClientID $env: GITHUB_ACTION_INPUT_ClientID - PrivateKey $env: GITHUB_ACTION_INPUT_PrivateKey - Silent - PassThru |
22- Select-Object * | Format-List
23- } elseif ($providedToken ) {
24- Connect-GitHub - Token $env: GITHUB_ACTION_INPUT_Token - Silent - PassThru |
25- Select-Object * | Format-List
26- } else {
27- Write-Output ' No connection provided'
28- }
19+ LogGroup ' - GitHub connection - Default' {
20+ Get-GitHubContext | Format-List
21+ }
22+
23+ LogGroup ' - GitHub connection - List' {
24+ Get-GitHubContext - ListAvailable | Format-Table
2925 }
3026
3127 LogGroup ' - Configuration' {
Original file line number Diff line number Diff line change 11[CmdletBinding ()]
2- param ()
2+ param (
3+ [string ]$Name = ' GitHub-Script - Init'
4+ )
35
46$scriptName = $MyInvocation.MyCommand.Name
57Write-Debug " [$scriptName ] - Start"
810 $env: PSMODULE_GITHUB_SCRIPT = $true
911
1012 if ($VerbosePreference -eq ' Continue' ) {
11- Write-Output ' βββββββ« GitHub-Script - Init β£ββββββ'
13+ $title = " βββββββ« $Name β£ββββββ"
14+ Write-Output $title
1215 Write-Output ' ::group:: - SetupGitHub PowerShell module'
1316 }
1417 $Name = ' GitHub'
7679 Write-Verbose " $ ( $moduleStatus | Format-List ) "
7780 if ($VerbosePreference -eq ' Continue' ) {
7881 Write-Output ' ::endgroup::'
79- Write-Output ' ββββββββββββββββββββββββββββββββββββ'
82+ Write-Output ' ::group:: - GitHub connection'
83+ }
84+ if ($providedClientID -and $providedPrivateKey ) {
85+ Connect-GitHub - ClientID $env: GITHUB_ACTION_INPUT_ClientID - PrivateKey $env: GITHUB_ACTION_INPUT_PrivateKey - Silent
86+ } elseif ($providedToken ) {
87+ Connect-GitHub - Token $env: GITHUB_ACTION_INPUT_Token - Silent
88+ }
89+ if ($VerbosePreference -eq ' Continue' ) {
90+ Write-Output ' ::endgroup::'
91+ $endingFence = ' β' + (' β' * ($title.Length - 2 )) + ' β'
92+ Write-Output $endingFence
8093 }
8194} catch {
8295 throw $_
You canβt perform that action at this time.
0 commit comments