Skip to content

Commit 29c7f47

Browse files
benhillisBen Hillis
andauthored
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>
1 parent 3a7cbeb commit 29c7f47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/actions/triage/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ runs:
2121
- name: 'Run WTI'
2222
shell: pwsh
2323
env:
24+
INPUT_COMMENT: "${{ inputs.comment }}"
25+
INPUT_ISSUE: "${{ inputs.issue }}"
26+
INPUT_TOKEN: "${{ inputs.token }}"
2427
previous_body: "${{ inputs.previous_body }}"
2528
run: |
2629
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
2730
2831
$maybe_comment = @()
29-
if (![string]::IsNullOrEmpty("${{ inputs.comment }}"))
32+
if (![string]::IsNullOrEmpty($env:INPUT_COMMENT))
3033
{
31-
$maybe_comment = @("--comment", "${{ inputs.comment }}")
34+
$maybe_comment = @("--comment", $env:INPUT_COMMENT)
3235
}
3336
3437
$maybe_previous_body = @()
@@ -40,4 +43,4 @@ runs:
4043
4144
curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.12/wti.exe -o triage/wti.exe
4245
43-
cd triage && .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ inputs.token }}" --ignore-tags @maybe_comment @maybe_previous_body
46+
cd triage && .\wti.exe --issue $env:INPUT_ISSUE --config config.yml --github-token $env:INPUT_TOKEN --ignore-tags @maybe_comment @maybe_previous_body

0 commit comments

Comments
 (0)