Skip to content

Commit

Permalink
fix(azure): don't strip out summary/details
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Sep 30, 2021
1 parent a630a92 commit 620c013
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions lib/platform/azure/__snapshots__/index.spec.ts.snap
Expand Up @@ -268,8 +268,6 @@ Object {
}
`;

exports[`platform/azure/index massageMarkdown(input) returns updated pr body 1`] = `"https://github.com/foo/bar/issues/5 plus also [a link](https://github.com/foo/bar/issues/5)"`;

exports[`platform/azure/index updatePr(prNo, title, body) should close the PR 1`] = `
Array [
Array [
Expand Down
6 changes: 4 additions & 2 deletions lib/platform/azure/index.spec.ts
Expand Up @@ -974,8 +974,10 @@ describe('platform/azure/index', () => {
describe('massageMarkdown(input)', () => {
it('returns updated pr body', () => {
const input =
'<details>https://github.com/foo/bar/issues/5 plus also [a link](https://github.com/foo/bar/issues/5)';
expect(azure.massageMarkdown(input)).toMatchSnapshot();
'\n---\n\n - [ ] <!-- rebase-check --> rebase\nplus also [a link](https://github.com/foo/bar/issues/5)';
expect(azure.massageMarkdown(input)).toMatchInlineSnapshot(
`"plus also [a link](https://github.com/foo/bar/issues/5)"`
);
});
});

Expand Down
6 changes: 1 addition & 5 deletions lib/platform/azure/index.ts
Expand Up @@ -678,11 +678,7 @@ export function massageMarkdown(input: string): string {
'you tick the rebase/retry checkbox',
'rename PR to start with "rebase!"'
)
.replace(new RegExp(`\n---\n\n.*?<!-- rebase-check -->.*?\n`), '')
.replace('<summary>', '**')
.replace('</summary>', '**')
.replace('<details>', '')
.replace('</details>', '');
.replace(new RegExp(`\n---\n\n.*?<!-- rebase-check -->.*?\n`), '');
}

/* istanbul ignore next */
Expand Down

0 comments on commit 620c013

Please sign in to comment.