diff --git a/.buildkite/pipeline-utils/test-failures/annotate.ts b/.buildkite/pipeline-utils/test-failures/annotate.ts index 8397fa670af66..c49128ae3c62b 100644 --- a/.buildkite/pipeline-utils/test-failures/annotate.ts +++ b/.buildkite/pipeline-utils/test-failures/annotate.ts @@ -91,11 +91,12 @@ export const getPrComment = ( const logsLink = artifactUrl ? ` [[logs]](${artifactUrl})` : ''; - // job name could have # in it, which Github will link to an issue, so we need to "escape" it with spans - return `* [[job]](${jobUrl})${logsLink} ${failure.jobName.replace( - '#', - '#' - )} / ${failure.name}`; + // failure name could have #, which Github will link to an issue or @, + // which will send a notification so we need to "escape" it with spans + const failureString = `${failure.jobName} / ${failure.name}` + .replaceAll('#', '#') + .replaceAll('@', '@'); + return `* [[job]](${jobUrl})${logsLink} ${failureString}`; }) .join('\n') );