diff --git a/src/components/ReleaseNotesRender/__tests__/ReleaseNotesRender.test.tsx b/src/components/ReleaseNotesRender/__tests__/ReleaseNotesRender.test.tsx index 3e023b49b..a6ee6f9f3 100644 --- a/src/components/ReleaseNotesRender/__tests__/ReleaseNotesRender.test.tsx +++ b/src/components/ReleaseNotesRender/__tests__/ReleaseNotesRender.test.tsx @@ -73,6 +73,7 @@ describe('ReleaseNotesRender component', () => { function mockReleaseNotes(num: number) { let releaseNoteDataBag = { releaseNoteAPIResponse :createMockReleaseNotesAPI(num), isValid: true }; + releaseNoteDataBag.releaseNoteAPIResponse.release_name = 'jdk-20+36'; releaseNoteDataBag.releaseNoteAPIResponse.release_notes[0].type = 'Enhancement'; return releaseNoteDataBag; } @@ -92,6 +93,7 @@ describe('ReleaseNotesRender component', () => { queryString.parse = vi.fn().mockReturnValue({'version': 'version'}); function mockReleaseNotes() { let releaseNoteDataBag = { releaseNoteAPIResponse :createMockReleaseNotesAPI(1), isValid: true }; + releaseNoteDataBag.releaseNoteAPIResponse.release_name = 'version'; releaseNoteDataBag.releaseNoteAPIResponse.release_notes[0].priority = undefined; return releaseNoteDataBag; } diff --git a/src/components/ReleaseNotesRender/__tests__/__snapshots__/ReleaseNotesRender.test.tsx.snap b/src/components/ReleaseNotesRender/__tests__/__snapshots__/ReleaseNotesRender.test.tsx.snap index b5448a342..660599988 100644 --- a/src/components/ReleaseNotesRender/__tests__/__snapshots__/ReleaseNotesRender.test.tsx.snap +++ b/src/components/ReleaseNotesRender/__tests__/__snapshots__/ReleaseNotesRender.test.tsx.snap @@ -6,7 +6,7 @@ exports[`ReleaseNotesRender component > should render correctly - no release not class="text-center" >
- ?version=x.x.x
-
-
+ + This section organizes the changes in the selected update release by the main component under which each issue is filed. +
++ + The total number of fixes marked as P1 is: 2 + +
+?version=x.x.x
diff --git a/src/hooks/fetchReleaseNotes.tsx b/src/hooks/fetchReleaseNotes.tsx
index 833dc37d4..7c210e59e 100644
--- a/src/hooks/fetchReleaseNotes.tsx
+++ b/src/hooks/fetchReleaseNotes.tsx
@@ -3,22 +3,32 @@ import { useEffect, useState } from 'react';
import axios from 'axios';
const baseUrl = 'https://api.adoptium.net/v3/info/release_notes';
+const releaseNamesUrl = 'https://api.adoptium.net/v3/info/release_names?heap_size=normal&image_type=jdk<s=true&page=0&page_size=1&project=jdk&release_type=ga&semver=false&sort_method=DEFAULT&sort_order=DESC&vendor=eclipse';
export function fetchReleaseNotesForVersion(
isVisible: boolean,
version: any,
sortReleaseNotesByCallback?: Function,
): ReleaseNoteDataBag | null {
- if (!version) {
- return null
- }
const [releaseNotes, setReleaseNotes] = useState