fix: improve trigger.pipeline validation with expression checks and better errors#196
Conversation
…etter errors (#189, #188) Add ADO expression rejection (${{, $(, $[) to triggers.pipeline.name, triggers.pipeline.project, and triggers.pipeline.branches entries, matching the existing checks on name/description fields. Include the offending branch value in newline validation error messages to aid debugging when multiple branches are configured. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Looks good — correct, well-tested, and security logic is sound. A few minor consistency nits worth cleaning up. Findings
|
Closes #189, closes #188.
Changes
ADO expression rejection (chore: add ADO expression check to trigger.pipeline fields or document why it's omitted #188): Added
${{ }},$(), and$[]checks totriggers.pipeline.name,triggers.pipeline.project, and eachtriggers.pipeline.branchesentry. These now match the existing checks onnameanddescriptionfields, providing defense-in-depth.Better error messages (fix: include offending branch name in trigger.pipeline validation error message #189): Branch validation errors now include the offending value using
{:?}formatting, making it easy to identify which branch entry triggered the failure when multiple branches are configured.Testing
Added 3 new tests covering expression rejection for trigger pipeline name, project, and branch fields. All 727 unit tests pass.