triage: pass action inputs via env vars instead of inline expansion (#40060)
Move inputs.comment, inputs.issue, and inputs.token into the env block, consistent with how inputs.previous_body is already handled. This avoids issues with special characters in input values being misinterpreted during shell evaluation. Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Ben Hillis committed
Apr 1, 2026 at 13:01 UTC
29c7f4741c5c62bf84da565cbcbd4a0c5d275571
1 file changed
+6
-3
.github/actions/triage/action.yml
+6
-3
@@ -21,14 +21,17 @@ runs:
21
- name: 'Run WTI'
22
shell: pwsh
23
env:
24
+ INPUT_COMMENT: "${{ inputs.comment }}"
25
+ INPUT_ISSUE: "${{ inputs.issue }}"
26
+ INPUT_TOKEN: "${{ inputs.token }}"
27
previous_body: "${{ inputs.previous_body }}"
28
run: |
29
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
30
31
$maybe_comment = @()
29
- if (![string]::IsNullOrEmpty("${{ inputs.comment }}"))
32
+ if (![string]::IsNullOrEmpty($env:INPUT_COMMENT))
33
{
31
- $maybe_comment = @("--comment", "${{ inputs.comment }}")
34
+ $maybe_comment = @("--comment", $env:INPUT_COMMENT)
35
}
36
37
$maybe_previous_body = @()
@@ -40,4 +43,4 @@ runs:
43
44
curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.12/wti.exe -o triage/wti.exe
45
43
- cd triage && .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ inputs.token }}" --ignore-tags @maybe_comment @maybe_previous_body
\ No newline at end of file
46
+ cd triage && .\wti.exe --issue $env:INPUT_ISSUE --config config.yml --github-token $env:INPUT_TOKEN --ignore-tags @maybe_comment @maybe_previous_body
\ No newline at end of file