From e5bb515be2b839954de23fa02854f5e72cfcc8da Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 22:09:17 +0200 Subject: [PATCH 1/3] A debug test --- .github/workflows/TestWorkflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index a81d233..a0efac8 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -409,7 +409,7 @@ jobs: Prerelease: ${{ inputs.Prerelease }} Script: | LogGroup 'Get-GitHubUser' { - Get-GitHubUser | Format-Table -AutoSize | Out-String + Get-GitHubUser -Debug | Format-Table -AutoSize | Out-String } LogGroup 'Get-GitHubOrganization' { From 3682fa10cdfdae120ce30c9ee36b7645fc0d7801 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 22:15:01 +0200 Subject: [PATCH 2/3] Fix debug --- action.yml | 2 ++ scripts/info.ps1 | 2 -- scripts/outputs.ps1 | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 431813c..966fc0c 100644 --- a/action.yml +++ b/action.yml @@ -92,6 +92,8 @@ runs: run: | # ${{ inputs.Name }} $ErrorView = $env:PSMODULE_GITHUB_SCRIPT_INPUT_ErrorView + $DebugPreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue' + $VerbosePreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Verbose -eq 'true' ? 'Continue' : 'SilentlyContinue' try { ${{ github.action_path }}/scripts/init.ps1 ${{ github.action_path }}/scripts/info.ps1 diff --git a/scripts/info.ps1 b/scripts/info.ps1 index 30b2ba0..ba5874a 100644 --- a/scripts/info.ps1 +++ b/scripts/info.ps1 @@ -60,6 +60,4 @@ process { end { Write-Debug "[$scriptName] - End" - $DebugPreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue' - $VerbosePreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Verbose -eq 'true' ? 'Continue' : 'SilentlyContinue' } diff --git a/scripts/outputs.ps1 b/scripts/outputs.ps1 index 0c4fd70..d5ca5a1 100644 --- a/scripts/outputs.ps1 +++ b/scripts/outputs.ps1 @@ -3,8 +3,6 @@ [CmdletBinding()] param() -$DebugPreference = 'SilentlyContinue' -$VerbosePreference = 'SilentlyContinue' $scriptName = $MyInvocation.MyCommand.Name Write-Debug "[$scriptName] - Start" From 76f1821760cca4c82ddef294fe12e4799cb219a1 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 1 Jul 2025 22:22:40 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20descript?= =?UTF-8?q?ions=20for=20Debug=20and=20Verbose=20inputs=20to=20clarify=20th?= =?UTF-8?q?eir=20scope=20in=20the=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- action.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1033cf2..28d87ad 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ To get started with your own GitHub PowerShell based action, [create a new repos | `Token` | Log in using an Installation Access Token (IAT). | false | `${{ github.token }}` | | `ClientID` | Log in using a GitHub App, with the App's Client ID and Private Key. | false | | | `PrivateKey` | Log in using a GitHub App, with the App's Client ID and Private Key. | false | | -| `Debug` | Enable debug output. | false | `'false'` | -| `Verbose` | Enable verbose output. | false | `'false'` | +| `Debug` | Enable debug output for the whole action. | false | `'false'` | +| `Verbose` | Enable verbose output for the whole action. | false | `'false'` | | `Version` | Specifies the exact version of the GitHub module to install. | false | | | `Prerelease` | Allow prerelease versions if available. | false | `'false'` | | `ErrorView` | Configure the PowerShell `$ErrorView` variable. You can use full names ('NormalView', 'CategoryView', 'ConciseView', 'DetailedView'). It matches on partials. | false | `'NormalView'` | diff --git a/action.yml b/action.yml index 966fc0c..eb5fa1f 100644 --- a/action.yml +++ b/action.yml @@ -24,11 +24,11 @@ inputs: description: Log in using a GitHub App, using the App's Client ID and Private Key. required: false Debug: - description: Enable debug output. + description: Enable debug output for the whole action. required: false default: 'false' Verbose: - description: Enable verbose output. + description: Enable verbose output for the whole action. required: false default: 'false' Version: