Repository: OWASP/Nest
Pull request #1019: Added upcoming events section
Author: login: samyak003
Labels: name: backend
name: frontend
name: frontend-tests
Created: 2025-03-05T19:20:08Z | Merged: 2025-03-06T19:06:21Z

Fixes: #995




Diff:
diff --git a/backend/apps/owasp/graphql/queries/event.py b/backend/apps/owasp/graphql/queries/event.py
index f9f3edc484..3921bb87a3 100644
--- a/backend/apps/owasp/graphql/queries/event.py
+++ b/backend/apps/owasp/graphql/queries/event.py
@@ -10,8 +10,8 @@
 class EventQuery(BaseQuery):
     """Event queries."""
 
-    upcoming_events = graphene.List(EventNode)
+    upcoming_events = graphene.List(EventNode, limit=graphene.Int(default_value=8))
 
-    def resolve_upcoming_events(root, info):
+    def resolve_upcoming_events(root, info, limit):
         """Resolve all events."""
-        return Event.upcoming_events
+        return Event.upcoming_events()[:limit]
diff --git a/backend/apps/owasp/models/event.py b/backend/apps/owasp/models/event.py
index 5c39eb60cd..e5876de66f 100644
--- a/backend/apps/owasp/models/event.py
+++ b/backend/apps/owasp/models/event.py
@@ -45,7 +45,7 @@ def __str__(self):
     @staticmethod
     def upcoming_events():
         """Get upcoming events."""
-        return Event.objects.filter(start_date__gte=timezone.now().date()).order_by("start_date")
+        return Event.objects.filter(start_date__gte=timezone.now()).order_by("start_date")
 
     @staticmethod
     def bulk_save(events, fields=None):
diff --git a/frontend/__tests__/e2e/data/mockHomeData.ts b/frontend/__tests__/e2e/data/mockHomeData.ts
index 2b013688e9..ca4b6d8416 100644
--- a/frontend/__tests__/e2e/data/mockHomeData.ts
+++ b/frontend/__tests__/e2e/data/mockHomeData.ts
@@ -178,5 +178,23 @@ export const mockHomeData = {
       countriesStats: 100,
       __typename: 'StatsNode',
     },
+    upcomingEvents: [
+      {
+        category: 'Category 1',
+        endDate: '2025-02-28',
+        name: 'Event 1',
+        startDate: '2025-02-27',
+        url: 'https://nest.owasp.org/events/event-1',
+        __typename: 'EventNode',
+      },
+      {
+        category: 'Category 2',
+        endDate: '2025-03-11',
+        name: 'Event 2',
+        startDate: '2025-03-10',
+        url: 'https://nest.owasp.org/events/event-2',
+        __typename: 'EventNode',
+      },
+    ],
   },
 }
diff --git a/frontend/__tests__/e2e/pages/Home.spec.ts b/frontend/__tests__/e2e/pages/Home.spec.ts
index 664f72741f..afaef3339d 100644
--- a/frontend/__tests__/e2e/pages/Home.spec.ts
+++ b/frontend/__tests__/e2e/pages/Home.spec.ts
@@ -67,4 +67,12 @@ test.describe('Home Page', () => {
     const page1 = await page1Promise
     expect(page1.url()).toBe('https://owasp.glueup.com/organization/6727/memberships/')
   })
+
+  test('should have upcoming events', async ({ page }) => {
+    await expect(page.getByRole('heading', { name: 'Upcoming Events' })).toBeVisible()
+    await expect(page.getByRole('link', { name: 'Event 1' })).toBeVisible()
+    await expect(page.getByText('Feb 27,')).toBeVisible()
+    await expect(page.getByText('Feb 28,')).toBeVisible()
+    await page.getByRole('link', { name: 'Event 1' }).click()
+  })
 })
diff --git a/frontend/__tests__/unit/data/mockHomeData.ts b/frontend/__tests__/unit/data/mockHomeData.ts
index c3011c4fcf..5a3e5523db 100644
--- a/frontend/__tests__/unit/data/mockHomeData.ts
+++ b/frontend/__tests__/unit/data/mockHomeData.ts
@@ -65,6 +65,15 @@ export const mockGraphQLData = {
     countriesStats: 245,
     contributorsStats: 9673,
   },
+  upcomingEvents: [
+    {
+      category: 'Category 1',
+      endDate: '2025-02-28',
+      name: 'Event 1',
+      startDate: '2025-02-27',
+      url: 'https://nest.owasp.org/events/event-1',
+    },
+  ],
 }
 
 export const mockAlgoliaData = {
diff --git a/frontend/__tests__/unit/pages/Home.test.tsx b/frontend/__tests__/unit/pages/Home.test.tsx
index 3bd344f5c5..fad8930c17 100644
--- a/frontend/__tests__/unit/pages/Home.test.tsx
+++ b/frontend/__tests__/unit/pages/Home.test.tsx
@@ -4,6 +4,7 @@ import { mockAlgoliaData, mockGraphQLData } from '@unit/data/mockHomeData'
 import { fetchAlgoliaData } from 'api/fetchAlgoliaData'
 import { toast } from 'hooks/useToast'
 import { Home } from 'pages'
+import { formatDate } from 'utils/dateFormatter'
 import { render } from 'wrappers/testUtil'
 
 jest.mock('hooks/useToast', () => ({
@@ -153,4 +154,17 @@ describe('Home', () => {
       expect(screen.getByText('Documentation')).toBeInTheDocument()
     })
   })
+
+  test('renders Upcoming Events section', async () => {
+    render(<Home />)
+    await waitFor(() => {
+      expect(screen.getByText('Upcoming Events')).toBeInTheDocument()
+      mockGraphQLData.upcomingEvents.forEach((event) => {
+        expect(screen.getByText(event.name)).toBeInTheDocument()
+        expect(
+          screen.getByText(`${formatDate(event.startDate)} - ${formatDate(event.endDate)}`)
+        ).toBeInTheDocument()
+      })
+    })
+  })
 })
diff --git a/frontend/src/api/queries/homeQueries.ts b/frontend/src/api/queries/homeQueries.ts
index 37cdde72cb..02e319b4b2 100644
--- a/frontend/src/api/queries/homeQueries.ts
+++ b/frontend/src/api/queries/homeQueries.ts
@@ -61,5 +61,12 @@ export const GET_MAIN_PAGE_DATA = gql`
       contributorsStats
       countriesStats
     }
+    upcomingEvents(limit: 6) {
+      category
+      endDate
+      name
+      startDate
+      url
+    }
   }
 `
diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx
index dae8930282..41aee67a00 100644
--- a/frontend/src/pages/Home.tsx
+++ b/frontend/src/pages/Home.tsx
@@ -15,6 +15,7 @@ import { toast } from 'hooks/useToast'
 import { useEffect, useState } from 'react'
 import { AlgoliaResponseType } from 'types/algolia'
 import { ChapterTypeAlgolia } from 'types/chapter'
+import { EventType } from 'types/event'
 import { MainPageData } from 'types/home'
 import { capitalize } from 'utils/capitalize'
 import { formatDate } from 'utils/dateFormatter'
@@ -128,6 +129,34 @@ export default function Home() {
           />
         </div>
       </div>
+      <SecondaryCard title="Upcoming Events">
+        <div className="grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
+          {data.upcomingEvents.map((event: EventType) => (
+            <div key={event.name} className="rounded-lg bg-gray-200 p-4 dark:bg-gray-700">
+              <h3 className="mb-2 truncate text-lg font-semibold text-blue-500">
+                <a
+                  href={event.url}
+                  className="hover:underline"
+                  target="_blank"
+                  rel="noopener noreferrer"
+                >
+                  {event.name}
+                </a>
+              </h3>
+              <div className="flex flex-wrap items-center text-sm text-gray-600 dark:text-gray-300">
+                <div className="mr-4 flex items-center">
+                  <FontAwesomeIcon icon={faCalendar} className="mr-2 h-4 w-4" />
+                  <span>
+                    {event.endDate && event.startDate != event.endDate
+                      ? `${formatDate(event.startDate)} - ${formatDate(event.endDate)}`
+                      : formatDate(event.startDate)}
+                  </span>
+                </div>
+              </div>
+            </div>
+          ))}
+        </div>
+      </SecondaryCard>
       <div className="grid gap-4 md:grid-cols-2">
         <SecondaryCard title="New Chapters">
           <div className="space-y-4">
diff --git a/frontend/src/types/event.ts b/frontend/src/types/event.ts
new file mode 100644
index 0000000000..c540720290
--- /dev/null
+++ b/frontend/src/types/event.ts
@@ -0,0 +1,8 @@
+export type EventType = {
+  category: string
+  endDate?: string
+  key: string
+  name: string
+  startDate: string
+  url: string
+}
diff --git a/frontend/src/types/home.ts b/frontend/src/types/home.ts
index bab092acee..9427d412c9 100644
--- a/frontend/src/types/home.ts
+++ b/frontend/src/types/home.ts
@@ -1,10 +1,12 @@
 import { TopContributorsTypeGraphql } from './contributor'
+import { EventType } from './event'
 import { ProjectIssuesType, ProjectReleaseType } from './project'
 
 export type MainPageData = {
   topContributors: TopContributorsTypeGraphql[]
   recentIssues: ProjectIssuesType[]
   recentReleases: ProjectReleaseType[]
+  upcomingEvents: EventType[]
   recentChapters: {
     name: string
     createdAt: string


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 3**

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>frontend/__tests__/unit/data/mockHomeData.ts (1)</summary><blockquote>

`68-77`: **Consider adding more diverse test cases**

The mock data only includes one event. Consider adding multiple events with different properties (e.g., one without an end date) to better test the handling of various scenarios.


```diff
 upcomingEvents: [
   {
     category: 'Global',
     description: 'Sample event description',
     endDate: '2024-12-24',
     name: 'Event 1',
     startDate: '2024-12-14',
     url: 'https://example.com/event1',
   },
+  {
+    category: 'Regional',
+    description: 'Another event without end date',
+    key: 'event-2',
+    name: 'Event 2',
+    startDate: '2024-12-20',
+    url: 'https://example.com/event2',
+  },
+  {
+    category: 'Local',
+    description: 'Past event for testing',
+    endDate: '2024-11-30',
+    key: 'event-3',
+    name: 'Event 3',
+    startDate: '2024-11-25',
+    url: 'https://example.com/event3',
+  },
 ],
```

</blockquote></details>
<details>
<summary>frontend/src/pages/Home.tsx (1)</summary><blockquote>

`253-287`: **Well-implemented upcoming events section with accessible links.**

The upcoming events section implementation follows the established UI patterns of the application and properly handles conditional rendering for optional end dates. The code is well-structured and uses the same styling approach as other similar sections.

One suggestion for improvement would be to add an aria-label to the links for better accessibility:

```diff
<a
  href={event.url}
  className="hover:underline"
  target="_blank"
  rel="noopener noreferrer"
+ aria-label={`Read more about ${event.name}`}
>
  {event.name}
</a>
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 649e4c05fce465f6ef7123ef4da977be82b1fbe3 and 9b7f8b7e796b93e83cfee7a2e154f69b8fd3060e.

</details>

<details>
<summary>📒 Files selected for processing (8)</summary>

* `backend/apps/owasp/graphql/queries/event.py` (1 hunks)
* `frontend/__tests__/e2e/pages/Home.spec.ts` (1 hunks)
* `frontend/__tests__/unit/data/mockHomeData.ts` (1 hunks)
* `frontend/__tests__/unit/pages/Home.test.tsx` (2 hunks)
* `frontend/src/api/queries/homeQueries.ts` (1 hunks)
* `frontend/src/pages/Home.tsx` (2 hunks)
* `frontend/src/types/event.ts` (1 hunks)
* `frontend/src/types/home.ts` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (8)</summary><blockquote>

<details>
<summary>frontend/src/types/event.ts (1)</summary>

`1-9`: **EventType definition looks good**

The type is well-structured with appropriate fields for representing events. The optional `endDate` property is correctly marked, allowing for events without a defined end date.

</details>
<details>
<summary>frontend/src/types/home.ts (2)</summary>

`2-2`: **Import of EventType is correctly added**

The import statement for the EventType from the event module is appropriate.

---

`9-9`: **upcomingEvents property added correctly**

The upcomingEvents property is properly defined as an array of EventType, consistent with other array properties in this type.

</details>
<details>
<summary>frontend/__tests__/e2e/pages/Home.spec.ts (1)</summary>

`72-79`: **Well-structured test for the new upcoming events feature!**

This test effectively verifies all key aspects of the new upcoming events section:
- Checks the section heading is visible
- Verifies event links are displayed
- Confirms date formatting is working
- Tests navigation functionality by clicking on an event link

The test structure follows the established pattern in the test suite and provides thorough coverage of the feature.

</details>
<details>
<summary>frontend/src/pages/Home.tsx (1)</summary>

`18-18`: **Import addition for new type looks good.**

Proper import of the EventType to support type checking for the new upcoming events feature.

</details>
<details>
<summary>frontend/__tests__/unit/pages/Home.test.tsx (2)</summary>

`7-7`: **Import addition for formatDate looks good.**

The formatDate import is needed for the new test case to verify formatted dates.

---

`158-169`: **Comprehensive test for upcoming events section.**

This test case effectively verifies all aspects of the upcoming events section:
- Confirms the section heading is rendered
- Iterates through mock data to ensure each event's name, description, and dates are displayed correctly

The test structure follows the established pattern in the test suite and maintains consistency with other component tests.

</details>
<details>
<summary>backend/apps/owasp/graphql/queries/event.py (1)</summary>

`13-13`: **Good addition of limit parameter with sensible default.**

Adding a limit parameter to the upcoming_events field with a default value of 8 is a good practice for pagination and performance optimization. This prevents potential performance issues when the number of events grows large.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T19:22:29Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>frontend/__tests__/e2e/data/mockHomeData.ts (1)</summary><blockquote>

`181-200`: **Consider enhancing mock data with more diverse test cases**

While the current mock data is sufficient for basic testing, consider adding the following variations to test edge cases:
- An event happening today (for "happening now" UI handling)
- A multi-day or week-long event
- An event with a missing optional field to test fallback handling

This would improve test coverage for different scenarios the UI might encounter.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9b7f8b7e796b93e83cfee7a2e154f69b8fd3060e and 082bc13a1105a634aad4e3cb7034162938aaef93.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `frontend/__tests__/e2e/data/mockHomeData.ts` (1 hunks)
* `frontend/__tests__/e2e/pages/Home.spec.ts` (1 hunks)
* `frontend/__tests__/unit/data/mockHomeData.ts` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* frontend/__tests__/e2e/pages/Home.spec.ts

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>frontend/__tests__/unit/data/mockHomeData.ts (1)</summary>

`68-77`: **Missing `key` property in mock event data**

The mock event data is missing the `key` property that is required according to the `EventType` definition. This inconsistency could cause tests to fail or not properly test the application behavior.

Apply this diff to add the missing property:

```diff
 upcomingEvents: [
   {
     category: 'Global',
     description: 'Sample event description',
     endDate: '2024-12-24',
+    key: 'event-1',
     name: 'Event 1',
     startDate: '2024-12-15',
     url: 'https://example.com/event1',
   },
 ],
```

</details>
<details>
<summary>frontend/__tests__/e2e/data/mockHomeData.ts (2)</summary>

`181-200`: **The mock data for upcoming events looks good!**

The added mock data for upcoming events follows the structure of other entities in the file and provides sufficient test cases with the necessary fields like category, description, dates, name, and URL for testing the new upcoming events section.

---

`185-188`: <details>
<summary>✅ Verification successful</summary>

**Verify date format consistency across the application**

I notice that the date format for upcoming events ('YYYY-MM-DD') differs from other date formats in the mock data (ISO 8601 with time and timezone). Make sure this is consistent with how your application expects and processes event dates.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check date format consistency across event-related files

# Check for event date formats in GraphQL queries
echo "Checking date formats in GraphQL queries..."
rg -A 2 -B 2 "startDate|endDate" --glob "*.{ts,tsx,graphql}"

# Check for date parsing/formatting in components that display events
echo "Checking date handling in components..."
rg -A 5 -B 5 "new Date|format|parse|toLocaleDateString" --glob "*.{ts,tsx}" | grep -A 3 -B 3 -E "event|Event"
```

Length of output: 9145

---



</details>

**Review: Confirm Date Format Alignment with App Expectations**

After checking the event mock data across the codebase, I found that both the unit tests (e.g., `frontend/__tests__/unit/data/mockHomeData.ts`) and the end-to-end tests (`frontend/__tests__/e2e/data/mockHomeData.ts`) consistently use the `'YYYY-MM-DD'` format for event dates. There is no evidence of an ISO 8601 timestamp (with time and timezone) in any of the mock files. 

Please verify that the date parsing logic (such as the usage of `formatDate` in components) is designed to work with this simplified format. If your application is meant to process full ISO dates, consider updating the mock data accordingly. Otherwise, no further changes are needed.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T19:56:36Z
user: login: arkid15r
body: Good work, please consider addressing these:
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-03-05T20:41:53Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>frontend/__tests__/e2e/data/mockHomeData.ts (1)</summary><blockquote>

`181-198`: **The upcomingEvents implementation looks good, but might be missing a description field.**

The implementation of the `upcomingEvents` property follows the same structure and style as other properties in the mock data object. However, according to the AI summary, each event should include a 'description' field, but it's not present in the mock event objects.

Consider adding the 'description' field to each event object if it's expected by the frontend implementation:

```diff
    upcomingEvents: [
      {
        category: 'Category 1',
+       description: 'Event 1',
        endDate: '2025-02-28',
        name: 'Event 1',
        startDate: '2025-02-27',
        url: 'https://nest.owasp.org/events/event-1',
        __typename: 'EventNode',
      },
      {
        category: 'Category 2',
+       description: 'Event 2',
        endDate: '2025-03-11',
        name: 'Event 2',
        startDate: '2025-03-10',
        url: 'https://nest.owasp.org/events/event-2',
        __typename: 'EventNode',
      },
    ],
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 082bc13a1105a634aad4e3cb7034162938aaef93 and 54f501f7e161324f11bf8851c16782634ed1f54c.

</details>

<details>
<summary>📒 Files selected for processing (6)</summary>

* `frontend/__tests__/e2e/data/mockHomeData.ts` (1 hunks)
* `frontend/__tests__/unit/data/mockHomeData.ts` (1 hunks)
* `frontend/__tests__/unit/pages/Home.test.tsx` (2 hunks)
* `frontend/src/api/queries/homeQueries.ts` (1 hunks)
* `frontend/src/pages/Home.tsx` (2 hunks)
* `frontend/src/types/event.ts` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (4)</summary>

* frontend/src/types/event.ts
* frontend/__tests__/unit/data/mockHomeData.ts
* frontend/src/pages/Home.tsx
* frontend/src/api/queries/homeQueries.ts

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (5)</summary>

* GitHub Check: CodeQL (python)
* GitHub Check: Run frontend unit tests
* GitHub Check: CodeQL (javascript-typescript)
* GitHub Check: Run frontend e2e tests
* GitHub Check: Run backend tests

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>frontend/__tests__/unit/pages/Home.test.tsx (2)</summary>

`7-7`: **Good addition of the formatDate utility.**

The import of the formatDate utility from the dateFormatter module is appropriate as it's being used in the new test to verify correctly formatted event dates.

---

`158-169`: <details>
<summary>❓ Verification inconclusive</summary>

**Well-structured test for the new Upcoming Events section.**

The test follows the established pattern in the file and adequately verifies that:
1. The "Upcoming Events" heading is rendered
2. Each event name is displayed correctly
3. The formatted date range for each event is displayed properly



Consider adding a defensive check in case `mockGraphQLData.upcomingEvents` is undefined or empty:

```diff
  test('renders Upcoming Events section', async () => {
    render(<Home />)
    await waitFor(() => {
      expect(screen.getByText('Upcoming Events')).toBeInTheDocument()
+     expect(mockGraphQLData.upcomingEvents.length).toBeGreaterThan(0)
      mockGraphQLData.upcomingEvents.forEach((event) => {
        expect(screen.getByText(event.name)).toBeInTheDocument()
        expect(
          screen.getByText(`${formatDate(event.startDate)} - ${formatDate(event.endDate)}`)
        ).toBeInTheDocument()
      })
    })
  })
```

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify that the mockGraphQLData contains upcomingEvents property
rg -A 5 "upcomingEvents" frontend/__tests__/unit/data/mockHomeData.ts
```

Length of output: 208

---



</details>

**Action: Enhance Upcoming Events Test Robustness**

The test is well-structured and effectively validates the "Upcoming Events" section by checking for the heading, event names, and date ranges. For stronger safety against future changes, consider adding a defensive assertion to verify that the `upcomingEvents` array is non-empty. Although our current mock data confirms the existence of this property (as shown in `frontend/__tests__/unit/data/mockHomeData.ts`), adding this extra check can help catch accidental omissions or misconfigurations in the data.

- **Location:** `frontend/__tests__/unit/pages/Home.test.tsx` (lines 158-169)
- **Suggestion:** Insert a check to ensure `mockGraphQLData.upcomingEvents` contains at least one element.

```diff
  test('renders Upcoming Events section', async () => {
    render(<Home />)
    await waitFor(() => {
      expect(screen.getByText('Upcoming Events')).toBeInTheDocument()
+     expect(mockGraphQLData.upcomingEvents.length).toBeGreaterThan(0)
      mockGraphQLData.upcomingEvents.forEach((event) => {
        expect(screen.getByText(event.name)).toBeInTheDocument()
        expect(
          screen.getByText(`${formatDate(event.startDate)} - ${formatDate(event.endDate)}`)
        ).toBeInTheDocument()
      })
    })
  })
```

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-06T17:47:18Z
user: login: arkid15r
body: Looks good 👍 
Let's move it to the top (right after the search bar) and show 6 events only.
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-03-06T18:22:49Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>frontend/src/pages/Home.tsx (1)</summary><blockquote>

`132-159`: **Well implemented upcoming events section!**

The implementation successfully addresses all previous feedback:
- Uses truncation for event titles that don't fit one line
- Keeps the cards compact by excluding descriptions
- Shows date ranges intelligently (single date when start/end are the same)

Good job on incorporating proper accessibility attributes for external links and making the layout responsive.


One small suggestion for improvement:
```diff
 <SecondaryCard title="Upcoming Events">
   <div className="grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
+    {data.upcomingEvents.length === 0 ? (
+      <div className="col-span-full text-center text-gray-500">No upcoming events at this time</div>
+    ) : (
       {data.upcomingEvents.map((event: EventType) => (
         <div key={event.name} className="rounded-lg bg-gray-200 p-4 dark:bg-gray-700">
           <h3 className="mb-2 truncate text-lg font-semibold text-blue-500">
             <a
               href={event.url}
               className="hover:underline"
               target="_blank"
               rel="noopener noreferrer"
             >
               {event.name}
             </a>
           </h3>
           <div className="flex flex-wrap items-center text-sm text-gray-600 dark:text-gray-300">
             <div className="mr-4 flex items-center">
               <FontAwesomeIcon icon={faCalendar} className="mr-2 h-4 w-4" />
               <span>
                 {event.endDate && event.startDate != event.endDate
                   ? `${formatDate(event.startDate)} - ${formatDate(event.endDate)}`
                   : formatDate(event.startDate)}
               </span>
             </div>
           </div>
         </div>
       ))}
+    )}
   </div>
 </SecondaryCard>
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 54f501f7e161324f11bf8851c16782634ed1f54c and 9b5218cb8ed9b63596fb08dc031489e5df9a64c3.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `frontend/src/api/queries/homeQueries.ts` (1 hunks)
* `frontend/src/pages/Home.tsx` (2 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* frontend/src/api/queries/homeQueries.ts

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (5)</summary>

* GitHub Check: CodeQL (python)
* GitHub Check: Run frontend unit tests
* GitHub Check: CodeQL (javascript-typescript)
* GitHub Check: Run frontend e2e tests
* GitHub Check: Run backend tests

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>frontend/src/pages/Home.tsx (1)</summary>

`18-18`: **Import looks good.**

Proper import of the EventType that's needed for type safety in the new upcoming events section.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-06T18:44:18Z
user: login: arkid15r
body: LGTM 👍 
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-06T19:00:15Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9b5218cb8ed9b63596fb08dc031489e5df9a64c3 and e105dbabdc2fb84c2f1fe4160413b8cb4bd3e7ec.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `backend/apps/owasp/graphql/queries/event.py` (1 hunks)
* `backend/apps/owasp/models/event.py` (1 hunks)
* `frontend/__tests__/e2e/pages/Home.spec.ts` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary>

* frontend/__tests__/e2e/pages/Home.spec.ts
* backend/apps/owasp/graphql/queries/event.py

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (5)</summary>

* GitHub Check: Run frontend e2e tests
* GitHub Check: CodeQL (python)
* GitHub Check: Run frontend unit tests
* GitHub Check: Run backend tests
* GitHub Check: CodeQL (javascript-typescript)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-06T19:03:03Z

Review comments:
diff_hunk: @@ -61,5 +61,13 @@ export const GET_MAIN_PAGE_DATA = gql`
       contributorsStats
       countriesStats
     }
+    upcomingEvents {
+      category
+      description
+      endDate
+      name
+      startDate
+      url
+    }
path: frontend/src/api/queries/homeQueries.ts
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Missing required `key` field in upcomingEvents query**

The `upcomingEvents` query field is missing the `key` field which is defined as required in the `EventType` interface in `frontend/src/types/event.ts`. This mismatch could lead to runtime errors if code tries to access the `key` property from event objects.


Apply this diff to include the missing field:

```diff
 upcomingEvents {
   category
   description
   endDate
+  key
   name
   startDate
   url
 }
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
    upcomingEvents {
      category
      description
      endDate
      key
      name
      startDate
      url
    }
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-05T19:22:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -65,6 +65,16 @@ export const mockGraphQLData = {
     countriesStats: 245,
     contributorsStats: 9673,
   },
+  upcomingEvents: [
+    {
+      category: 'Global',
+      description: 'Sample event description',
+      endDate: '2024-12-24',
+      name: 'Event 1',
+      startDate: '2024-12-14',
+      url: 'https://example.com/event1',
+    },
+  ],
path: frontend/__tests__/unit/data/mockHomeData.ts
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Missing `key` property in mock event data**

The mock event data is missing the `key` property that is required according to the `EventType` definition. This inconsistency could cause tests to fail or not properly test the application behavior.


Apply this diff to add the missing property:

```diff
 upcomingEvents: [
   {
     category: 'Global',
     description: 'Sample event description',
     endDate: '2024-12-24',
+    key: 'event-1',
     name: 'Event 1',
     startDate: '2024-12-14',
     url: 'https://example.com/event1',
   },
 ],
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
  upcomingEvents: [
    {
      category: 'Global',
      description: 'Sample event description',
      endDate: '2024-12-24',
      key: 'event-1',
      name: 'Event 1',
      startDate: '2024-12-14',
      url: 'https://example.com/event1',
    },
  ],
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-05T19:22:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -10,8 +10,8 @@
 class EventQuery(BaseQuery):
     """Event queries."""
 
-    upcoming_events = graphene.List(EventNode)
+    upcoming_events = graphene.List(EventNode, limit=graphene.Int(default_value=8))
 
-    def resolve_upcoming_events(root, info):
+    def resolve_upcoming_events(root, info, limit):
         """Resolve all events."""
-        return Event.upcoming_events
+        return Event.objects.order_by("start_date")[:limit]
path: backend/apps/owasp/graphql/queries/event.py
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Improved resolver implementation with ordering and limiting.**

The updated resolver correctly:
1. Orders events by start_date, ensuring chronological display
2. Limits the results based on the provided parameter

One suggestion: Consider adding filtering to only return future events rather than all events to ensure the "upcoming" aspect is respected:

```diff
def resolve_upcoming_events(root, info, limit):
    """Resolve all events."""
-   return Event.objects.order_by("start_date")[:limit]
+   from django.utils import timezone
+   return Event.objects.filter(start_date__gte=timezone.now()).order_by("start_date")[:limit]
```

This would ensure only events that haven't started yet are returned.




<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
    def resolve_upcoming_events(root, info, limit):
        """Resolve all events."""
        from django.utils import timezone
        return Event.objects.filter(start_date__gte=timezone.now()).order_by("start_date")[:limit]
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-05T19:22:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -249,6 +250,41 @@ export default function Home() {
           <MovingLogos sponsors={data.sponsors} />
         </SecondaryCard>
       </div>
+      <div className="mb-20 mt-8">
+        <SecondaryCard title="Upcoming Events">
+          <div className="grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
+            {data.upcomingEvents.map((event: EventType) => (
+              <div key={event.name} className="rounded-lg bg-gray-200 p-4 dark:bg-gray-700">
+                <h3 className="mb-2 text-lg font-semibold">
+                  <a
+                    href={event.url}
+                    className="hover:underline"
+                    target="_blank"
+                    rel="noopener noreferrer"
+                  >
+                    {event.name}
+                  </a>
+                </h3>
+                <div className="mb-2">
+                  <p>{event.description}</p>
+                </div>
+                <div className="flex flex-wrap items-center text-sm text-gray-600 dark:text-gray-300">
+                  <div className="mr-4 flex items-center">
path: frontend/src/pages/Home.tsx
user: login: arkid15r
body: Let's keep it simple and instead Mar 13, 2025 Mar 13, 2025 show Mar 13 , 2025 if start/end date is the same or range if they differ. Let's minimize redundancy.
created_at: 2025-03-05T20:39:19Z
author_association: COLLABORATOR
diff_hunk: @@ -249,6 +250,41 @@ export default function Home() {
           <MovingLogos sponsors={data.sponsors} />
         </SecondaryCard>
       </div>
+      <div className="mb-20 mt-8">
+        <SecondaryCard title="Upcoming Events">
+          <div className="grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
+            {data.upcomingEvents.map((event: EventType) => (
+              <div key={event.name} className="rounded-lg bg-gray-200 p-4 dark:bg-gray-700">
+                <h3 className="mb-2 text-lg font-semibold">
+                  <a
+                    href={event.url}
+                    className="hover:underline"
+                    target="_blank"
+                    rel="noopener noreferrer"
+                  >
+                    {event.name}
+                  </a>
+                </h3>
+                <div className="mb-2">
+                  <p>{event.description}</p>
path: frontend/src/pages/Home.tsx
user: login: arkid15r
body: I'd prefer to keep the event cards compact -- let's remove the description until we have an AI generated summary
created_at: 2025-03-05T20:40:21Z
author_association: COLLABORATOR
diff_hunk: @@ -249,6 +250,41 @@ export default function Home() {
           <MovingLogos sponsors={data.sponsors} />
         </SecondaryCard>
       </div>
+      <div className="mb-20 mt-8">
+        <SecondaryCard title="Upcoming Events">
+          <div className="grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
+            {data.upcomingEvents.map((event: EventType) => (
+              <div key={event.name} className="rounded-lg bg-gray-200 p-4 dark:bg-gray-700">
+                <h3 className="mb-2 text-lg font-semibold">
path: frontend/src/pages/Home.tsx
user: login: arkid15r
body: Could you make it truncated `...` if title doesn't fit one line?
created_at: 2025-03-05T20:41:50Z
author_association: COLLABORATOR
diff_hunk: @@ -45,7 +45,7 @@ def __str__(self):
     @staticmethod
     def upcoming_events():
         """Get upcoming events."""
-        return Event.objects.filter(start_date__gte=timezone.now().date()).order_by("start_date")
+        return Event.objects.filter(start_date__gte=timezone.now()).order_by("start_date")
path: backend/apps/owasp/models/event.py
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Potential issue with upcoming events filtering**

The change from `timezone.now().date()` to `timezone.now()` will cause events scheduled for the current date to be excluded from "upcoming events" once the day begins. Since `start_date` is a DateField (without time component), Django will compare it with midnight time, making current-day events appear as "past" events after midnight.


Consider reverting to using `timezone.now().date()` to ensure events for the current date continue to appear in upcoming events:

```diff
-        return Event.objects.filter(start_date__gte=timezone.now()).order_by("start_date")
+        return Event.objects.filter(start_date__gte=timezone.now().date()).order_by("start_date")
```

Alternatively, if you want to exclude events from the current date that have already occurred, you would need to modify the model to store start times as well as dates.


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
        return Event.objects.filter(start_date__gte=timezone.now().date()).order_by("start_date")
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-06T19:03:02Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-03-05T19:20:15Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Summary by CodeRabbit

- **New Features**
  - The Home page now features an "Upcoming Events" section displaying upcoming events with clear details such as name, category, and dates.
  - Event listings are now limited to a concise number of entries for a cleaner, more focused presentation.
  - Improved filtering ensures that events starting any time on the current day are included, offering users a more timely overview.
## Walkthrough

The changes update both backend and frontend components to support upcoming events. The backend modifies the `EventQuery` to include a `limit` parameter for the `upcoming_events` field, allowing for a controlled subset of events to be returned. The frontend enhances the GraphQL query to fetch upcoming events, introduces a new section in the Home component to display these events, and updates data types accordingly. Additionally, new tests and mock data have been created to ensure the accurate display and functionality of the upcoming events feature.

## Changes

| File(s) | Change Summary |
|---------|----------------|
| `backend/apps/owasp/.../event.py` | Updated `EventQuery` by adding a `limit` argument to the `upcoming_events` field and modifying `resolve_upcoming_events` to return a limited queryset based on the `limit`. |
| `frontend/__tests__/e2e/.../Home.spec.ts`, `frontend/__tests__/unit/.../mockHomeData.ts`, `frontend/__tests__/unit/.../Home.test.tsx` | Added new test cases and mock data to verify the display and functionality of the Upcoming Events section on the Home page. |
| `frontend/src/api/.../homeQueries.ts` | Extended the `GET_MAIN_PAGE_DATA` GraphQL query to include an `upcomingEvents` field with subfields (`category`, `endDate`, `name`, `startDate`, `url`). |
| `frontend/src/pages/Home.tsx` | Introduced a new Upcoming Events section in the Home component, utilizing a grid layout with `SecondaryCard` and mapping over event data with formatted dates. |
| `frontend/src/types/event.ts`, `frontend/src/types/home.ts` | Added a new `EventType` defining event properties and updated `MainPageData` to include an `upcomingEvents: EventType[]` property. |
| `frontend/__tests__/e2e/.../mockHomeData.ts` | Added `upcomingEvents` property containing event objects to the mock data structure. |
| `backend/apps/owasp/.../event.py` | Modified `upcoming_events` method logic to filter events based on the current date and time instead of just midnight. |

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpADK2VmgqyjcEj2wAbb5AokAI7Y0riQ4rjedJAARACCtEr02NxMzPAYRJAkUhi4yIii4vgYMZAA7mgF2ALpuDT0cuGwntiFfIhozLJoANYADP0AzOgY9KjwSnnwAGbw0U24LZAYTgKUkACM/ZsAnBowy7zwzC7y3NgU3PiF/DPNqLYoyAToiQGIyEiIIStrG7tdgBWAA06C+Y3gDGo0QyzU8SkQDAo8G4xQwBw81js0Kw63QDAY0kK9CWFHw2CIsHhkBm+F8+HKGSyAFUbAAZLgAbVg9W4iA4AHpBUR1LAaho0oKAPIAdTi9isgoAcqFBRdfILtnsALoACl5uH5QpFYolUrlCqVqsQuHVPm8Wp2uwAlBpzJYAMIsNh5ZCOZyuIwASSwS08aV9+UghTE8BKdxpGr8AWCoTBaEgbQ2GC60RcvUmmyBfAywXgAXoKgpYRStBhyACRBctGZNNsGfexLbnW6fUGI1bATE3lkmOWkfY/hIMyiYmQmdTIVttPwfF4+CIH2Qa9pl3DpYwdIop3R/DDy1t1DaifDjFgmFIyA31xJKAvnmT07TtvHlE8LieBg+BvK26JoH4k5+vwfCtkibSIPGGDPh8U5wneG4SJM0RQdGsbou6Bj6MY4BQGQ9D4PcaB4IQpDkFQDQKKw7BcLw/DCEUkjSJATRMEoVCqOoWg6MRJhQHAEwLlg1EEMQZDKIxuFcFQ5Qxk4pyuDx8h8cogmaNouhgIYJGmAYAhoAwvTkYKaDcPygqMlU3AilQ3CwIEjppii0iCjk7AaNwsgcAYMShQYFiQHEwZyfRML0D8gbyJR96PtI7jLAABgAorkuAAIohK4GWMN4VQQjSGV+XkAWyMVcxRJAD4yCQZCQMwiizPMpIgWQD4YESFUpGkzIA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mzGG/Nnj1QGzRB0y/wjyVE9EDEyxthbgxWOV9T3lBDYCXtZsMCXDl6jUwgHVtgZTiBsAYFqEaDATlB6hugHZId8MO0DxM5zYgdTgHboBhDpC0CexUiaAoHyyMTGymzsCM4HXcRQf56wdcIIeof23DUYfO3Adf4p64cjbQf0MICUsmk8TkgKGYcdGnHKErUGzwCZivCQueB0wwlvttyYD4zaHPqMDYdccwhggMQ7ESFyMYASqrS3A9Fez4eTBEe8j3mlQGzT1FOYfQ3ZsL1lPfkVNYKFvVP4IUnFKlLkLiziFkcS5Iszgpt8xQURLiLHvDKHsJL9vPKDtvIjsHTjvVRrKQAmLBf3A7JtIReDJRey24AsZxczIvJDsaI2Njv62GJlrASIMKLlL+cBBgh1ZhDNyig7tk5dQuhTPEQGBiR7aJgyS0RQOKQ+gsT+BoCqQwOaS8TCICRqD6QiRGR9ekRMR1AjSTDQoBBYS1x0AjRvu9f9e7ACC1ozAIwnckC1q7BtkCC7BDAkAIxDAMAzAtS1poDwrFimEzBtnHcIwzC0BDD9Btn9CeCiSrf9AIywoCAMCbBDBoCbDbBAhoBtlDCmFoBsqmEkBPcnfDCmGbBtmwp3cIzo8zh3eGSGD9dAhfdAg7AzC1okD4+w+wpfcI9IUIwIxAibAw9tm1qQ8o+Y+0CbAzBU9QZg8QCQDHdAiwqbAIwMACAIx0DHco9AjXczACAQ+0AMDDCbCmEIy7AkBAi0AzC7DI+mEMAjBi9kSI+0DmQCCa+wpq8Ixm8O9C8kB4/A949DDy9y+mF2/3f0+i/Lcrfi+RjqAbe0Bbc5DzDlB7f9H6BAA= -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=OWASP/Nest&utm_content=1019):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: arkid15r
created_at: 2025-03-06T16:17:56Z
body: @samyak003 any updates on this?
author_association: COLLABORATOR
user: login: sonarqubecloud[bot]
created_at: 2025-03-06T19:00:48Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=OWASP_Nest&pullRequest=1019) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=OWASP_Nest&pullRequest=1019&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=OWASP_Nest&pullRequest=1019&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=OWASP_Nest&pullRequest=1019&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=OWASP_Nest&pullRequest=1019&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=OWASP_Nest&pullRequest=1019&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=OWASP_Nest&pullRequest=1019)


author_association: NONE