Use PowerShell here-strings for shareable queries#132
Conversation
Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
…e logic Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
|
@copilot , this doesn't look good. A simple test results in this powershell share output: $params = @{ The $query variable is not c |
…meter Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Fixed in commit afd58a1. The issue was that the The fix constructs the Body expression without escaping the variable reference, so now it outputs: Body = "query=$query" |

PowerShell Share Feature Improvements
getAsPowerShellStringinsparql.tsto use multi-line string format with$query = @"..."@result.${ext}tosparql-generated.${ext}Changes Made
$query = @"..."@syntax for the query parameter, making it much easier to edit before executionresult.${ext}tosparql-generated.${ext}to make it clearer what the file contains$querywithout escaping, allowing PowerShell to expand the variableExample Output
After fix:
Test Results
All validation checks passed:
Benefits
sparql-generated.jsonfilename better indicates what the file contains$queryvariable is correctly expanded by PowerShellSecurity Summary
✓ CodeQL analysis completed with no security vulnerabilities found
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.