Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Avoid unintended notifications on failing test comment #174124

Merged
merged 6 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .buildkite/pipeline-utils/test-failures/annotate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ export const getPrComment = (

const logsLink = artifactUrl ? ` [[logs]](${artifactUrl})` : '';

// job name could have #<number> in it, which Github will link to an issue, so we need to "escape" it with spans
return `* [[job]](${jobUrl})${logsLink} ${failure.jobName.replace(
'#',
'#<span></span>'
)} / ${failure.name}`;
// failure name could have #<number>, which Github will link to an issue or @<string>,
// which will send a notification so we need to "escape" it with spans
const failureString = `${failure.jobName} / ${failure.name}`
.replace('#', '#<span></span>')
.replace('@', '@<span></span>');
return `*[[job]](${jobUrl})${logsLink} ${failureString}}`;
jbudz marked this conversation as resolved.
Show resolved Hide resolved
})
.join('\n')
);
Expand Down
4 changes: 2 additions & 2 deletions src/dev/file.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ describe('dev/File', () => {
});

describe('#isJs()', () => {
it('returns true if extension is .js', () => {
it('returns true if extension is .js @jbudz #12345', () => {
const file = new File('file.js');
expect(file.isJs()).toBe(true);
expect(file.isJs()).not.toBe(true);
});
it('returns false if extension is .xml', () => {
const file = new File('file.xml');
Expand Down