From 178c4e6ac2959daea5b4958599a95677ce0da928 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 19:43:33 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20logging?= =?UTF-8?q?=20groups=20to=20connect=20to=20GitHub=20App=20installations=20?= =?UTF-8?q?and=20display=20contexts=20and=20Git=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 71831dc..98b3ce3 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -495,12 +495,16 @@ jobs: Get-GitHubAppInstallation | Format-Table -AutoSize | Out-String } - LogGroup 'Do something as an installation' { - Get-GithubAppInstallation | New-GitHubAppInstallationAccessToken | ForEach-Object { - Connect-GitHub -Token $_.token -Silent + LogGroup 'Connect to all installations of the app' { + Connect-GitHubApp + } + + LogGroup 'Contexts' { Get-GitHubContext | Format-Table -AutoSize | Out-String + } + + LogGroup 'GitConfig' { Get-GitHubGitConfig | Format-Table -AutoSize | Out-String - } } ActionTestWithGitHubAppOrg: @@ -526,12 +530,16 @@ jobs: Get-GitHubAppInstallation | Format-Table -AutoSize | Out-String } - LogGroup 'Do something as an installation' { - Get-GithubAppInstallation | New-GitHubAppInstallationAccessToken | ForEach-Object { - Connect-GitHub -Token $_.token -Silent + LogGroup 'Connect to all installations of the app' { + Connect-GitHubApp + } + + LogGroup 'Contexts' { Get-GitHubContext | Format-Table -AutoSize | Out-String + } + + LogGroup 'GitConfig' { Get-GitHubGitConfig | Format-Table -AutoSize | Out-String - } } ActionTestPreserveCredentialsFalse: From e9ec97afbdaf6aa890386f8971ea6dd5cba79a7b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 19:46:17 +0200 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Get-GitH?= =?UTF-8?q?ubContext=20calls=20to=20use=20-ListAvailable=20for=20improved?= =?UTF-8?q?=20context=20retrieval?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 98b3ce3..6ef55b2 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -500,7 +500,7 @@ jobs: } LogGroup 'Contexts' { - Get-GitHubContext | Format-Table -AutoSize | Out-String + Get-GitHubContext -ListAvailable | Format-Table -AutoSize | Out-String } LogGroup 'GitConfig' { @@ -535,7 +535,7 @@ jobs: } LogGroup 'Contexts' { - Get-GitHubContext | Format-Table -AutoSize | Out-String + Get-GitHubContext -ListAvailable | Format-Table -AutoSize | Out-String } LogGroup 'GitConfig' { From 9e76f4e86aeb5fc8d425f1119d07194f6a2eefce Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 19:50:20 +0200 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20output?= =?UTF-8?q?=20formatting=20in=20GitHub=20app=20and=20config=20retrieval=20?= =?UTF-8?q?to=20use=20Format-List=20for=20improved=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 6ef55b2..700f19d 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -488,7 +488,7 @@ jobs: Prerelease: ${{ inputs.Prerelease }} Script: | LogGroup 'Get-GitHubApp' { - Get-GitHubApp | Format-Table -AutoSize | Out-String + Get-GitHubApp | Format-List | Out-String } LogGroup 'Get-GitHubAppInstallation' { @@ -504,7 +504,7 @@ jobs: } LogGroup 'GitConfig' { - Get-GitHubGitConfig | Format-Table -AutoSize | Out-String + Get-GitHubConfig | Format-List | Out-String } ActionTestWithGitHubAppOrg: @@ -523,7 +523,7 @@ jobs: Prerelease: ${{ inputs.Prerelease }} Script: | LogGroup 'Get-GitHubApp' { - Get-GitHubApp | Format-Table -AutoSize | Out-String + Get-GitHubApp | Format-List | Out-String } LogGroup 'Get-GitHubAppInstallation' { @@ -539,7 +539,7 @@ jobs: } LogGroup 'GitConfig' { - Get-GitHubGitConfig | Format-Table -AutoSize | Out-String + Get-GitHubConfig | Format-List | Out-String } ActionTestPreserveCredentialsFalse: From 7bcf3a8e4a72fc3f6286cbc8ff13d4aa268d241c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 19:54:34 +0200 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Rename=20logging?= =?UTF-8?q?=20groups=20from=20'GitConfig'=20to=20'GitHubConfig'=20for=20co?= =?UTF-8?q?nsistency=20in=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 700f19d..a81d233 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -503,7 +503,7 @@ jobs: Get-GitHubContext -ListAvailable | Format-Table -AutoSize | Out-String } - LogGroup 'GitConfig' { + LogGroup 'GitHubConfig' { Get-GitHubConfig | Format-List | Out-String } @@ -538,7 +538,7 @@ jobs: Get-GitHubContext -ListAvailable | Format-Table -AutoSize | Out-String } - LogGroup 'GitConfig' { + LogGroup 'GitHubConfig' { Get-GitHubConfig | Format-List | Out-String }