Root cause: String.replace interprets $1, $&, $$ in replacement strings. When prTitle from the API contains $ (e.g. monetary values), interpolated replacement strings corrupt the published reviewSummary.
Fix:
- Use callback replacements in
correctMisplacedWorkItemTitlessoprTitleis literal text, not replace metacharacters.
Tests:
- ADO: WI title correction and header rewrite with
$in prTitle - GitHub: WI title correction with
$in prTitle
npm test