diff --git a/lib/platform/gitlab/index.spec.ts b/lib/platform/gitlab/index.spec.ts index 72e26a2970a9031a1aef20144d5a76663d35c384..b4714de7ed8c136e96c8a3616867c9db517c4c1f 100644 --- a/lib/platform/gitlab/index.spec.ts +++ b/lib/platform/gitlab/index.spec.ts @@ -1870,6 +1870,16 @@ These updates have all been created already. Click a checkbox below to force a r expect(smartTruncate).toHaveBeenCalledTimes(1); expect(smartTruncate).toHaveBeenCalledWith(expect.any(String), 25000); }); + + it('truncates description for API version gt 13.4', async () => { + jest.mock('../utils/pr-body'); + const { smartTruncate } = require('../utils/pr-body'); + + await initFakePlatform('13.4.1'); + gitlab.massageMarkdown(prBody); + expect(smartTruncate).toHaveBeenCalledTimes(1); + expect(smartTruncate).toHaveBeenCalledWith(expect.any(String), 1000000); + }); }); describe('getVulnerabilityAlerts()', () => { diff --git a/lib/platform/gitlab/index.ts b/lib/platform/gitlab/index.ts index 43e82367b2cb5144a08220ac7464bc694dc91e81..97bb7e18cbc574200fd80355c8bcf3753d05b64e 100644 --- a/lib/platform/gitlab/index.ts +++ b/lib/platform/gitlab/index.ts @@ -685,6 +685,8 @@ export function massageMarkdown(input: string): string { ); desc = smartTruncate(desc, 25000); + } else { + desc = smartTruncate(desc, 1000000); } return desc;