[7.x] fix indentation of failure issue bodies (#47864) (#47887)

This commit is contained in:
Spencer 2019-10-10 14:36:32 -07:00 committed by GitHub
parent 09d72bb9b5
commit 566cd69a98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -51,9 +51,11 @@ describe('createFailureIssue()', () => {
Array [
"Failing test: some.classname - test name",
"A test failed on a tracked branch
\`\`\`
this is the failure text
\`\`\`
First failure: [Jenkins Build](https://build-url)
<!-- kibanaCiData = {\\"failed-test\\":{\\"test.class\\":\\"some.classname\\",\\"test.name\\":\\"test name\\",\\"test.failCount\\":1}} -->",

View file

@ -18,7 +18,6 @@
*/
import { ToolingLog } from '@kbn/dev-utils';
import dedent from 'dedent';
import { TestFailure } from './get_failures';
import { GithubIssue, GithubApi } from './github_api';
@ -33,13 +32,15 @@ export async function createFailureIssue(
const title = `Failing test: ${failure.classname} - ${failure.name}`;
const body = updateIssueMetadata(
dedent`
A test failed on a tracked branch
\`\`\`
${failure.failure}
\`\`\`
First failure: [Jenkins Build](${buildUrl})
`,
[
'A test failed on a tracked branch',
'',
'```',
failure.failure,
'```',
'',
`First failure: [Jenkins Build](${buildUrl})`,
].join('\n'),
{
'test.class': failure.classname,
'test.name': failure.name,