This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Commit 753a760
committed
Import-TestData: use Write-Host for workflow commands/status; validate GITHUB_ENV
Addresses Copilot review threads: switch the four Write-Output calls (no-op notice, ::add-mask::, and the two 'Exposed N ...' status lines) to Write-Host so they go to the information stream instead of the success/pipeline stream. This keeps the secret embedded in ::add-mask:: out of the function's return value and prevents status text from interfering with callers using Import-TestData in an expression context. Module already carries a module-level PSAvoidUsingWriteHost suppression, so no new suppression is needed.
Also validate GITHUB_ENV up front and throw a clear message instead of letting Add-Content fail with a generic parameter-binding error when run outside GitHub Actions.
Adds tests/Import-TestData.Tests.ps1 (wired into Action-Test.yml) to close the coverage gap: asserts nothing reaches the success stream, masking still happens on the information stream, the no-op path is silent, and the GITHUB_ENV guard fires.1 parent 001135a commit 753a760
3 files changed
Lines changed: 86 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1207 | 1207 | | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | | - | |
| 1210 | + | |
1211 | 1211 | | |
1212 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1213 | 1216 | | |
1214 | 1217 | | |
1215 | 1218 | | |
| |||
1298 | 1301 | | |
1299 | 1302 | | |
1300 | 1303 | | |
1301 | | - | |
| 1304 | + | |
1302 | 1305 | | |
1303 | 1306 | | |
1304 | 1307 | | |
| |||
1312 | 1315 | | |
1313 | 1316 | | |
1314 | 1317 | | |
1315 | | - | |
| 1318 | + | |
1316 | 1319 | | |
1317 | | - | |
| 1320 | + | |
1318 | 1321 | | |
1319 | 1322 | | |
1320 | 1323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments