Skip to content

Conversation

@neiljar
Copy link

@neiljar neiljar commented Jan 18, 2026

PR #4940

Summary by CodeRabbit

  • New Features

    • State information is now tracked and included with issue records.
  • Bug Fixes

    • Good first issues list now excludes closed issues and displays only open ones.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Neil <neiljar888@gmail.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

The changes enhance the dashboard's good first issues feature to include issue state tracking. A state field is added to the GraphQL query schema, type definitions are extended to include the state property, and the mapping function is updated to filter for OPEN issues only while preserving the state in the output.

Changes

Cohort / File(s) Summary
Good First Issues State Enhancement
scripts/dashboard/issue-queries.ts, scripts/dashboard/build-dashboard.ts, types/scripts/dashboard.ts
GraphQL query updated to fetch issue state; type interfaces extended with state property (required in GoodFirstIssues, optional in MappedIssue); mapping function filters to OPEN issues only and includes state in returned objects

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit hops through issues keen,
Filtering OPEN ones, so clean,
State field dancing, fresh and bright,
Good first issues shine with light! ✨🐰

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: filter out closed issues in dashboard issue mapping' directly and clearly summarizes the main change: filtering out closed issues in the dashboard mapping process.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Jan 18, 2026

Deploy Preview for asyncapi-website failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit 10bb808
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/696c7619fc147f00084e763a

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@scripts/dashboard/build-dashboard.ts`:
- Around line 273-288: The new strict filter in mapGoodFirstIssues is dropping
legacy fixtures that omit state; update the function mapGoodFirstIssues to
handle missing state by treating undefined as 'OPEN' (e.g., use (issue.state ??
'OPEN') === 'OPEN') or remove the filter and handle state on MappedIssue
consumers, and update any GoodFirstIssues test fixtures to include state: 'OPEN'
to keep tests deterministic; touch the mapGoodFirstIssues implementation and
related test fixtures (GoodFirstIssues / MappedIssue) accordingly.

Comment on lines 273 to +288
async function mapGoodFirstIssues(issues: GoodFirstIssues[]): Promise<MappedIssue[]> {
return issues.map((issue) => ({
id: issue.id,
title: issue.title,
isAssigned: !!issue.assignees.totalCount,
resourcePath: issue.resourcePath,
repo: `asyncapi/${issue.repository.name}`,
author: issue.author.login,
area: getLabel(issue, 'area/') || 'Unknown',
labels: issue.labels!.nodes.filter(
(label) => !label.name.startsWith('area/') && !label.name.startsWith('good first issue')
)
}));
return issues
.filter((issue) => issue.state === 'OPEN')
.map((issue) => ({
id: issue.id,
title: issue.title,
isAssigned: !!issue.assignees.totalCount,
resourcePath: issue.resourcePath,
repo: `asyncapi/${issue.repository.name}`,
author: issue.author.login,
area: getLabel(issue, 'area/') || 'Unknown',
labels: issue.labels!.nodes.filter(
(label) => !label.name.startsWith('area/') && !label.name.startsWith('good first issue')
),
state: issue.state
}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix failing tests: new state filter drops items when state is missing.

With the new issue.state === 'OPEN' filter, any fixtures/mocks lacking state will be filtered out, which matches the reported failures (empty/undefined results). Update test fixtures/mocks to include state: 'OPEN' (or adjust expectations), or add a backward‑compatible fallback if legacy data can omit state. Based on pipeline failures, ...

🔧 Optional defensive fallback (keeps legacy fixtures working)
-  return issues
-    .filter((issue) => issue.state === 'OPEN')
+  return issues
+    .filter((issue) => (issue.state ?? 'OPEN') === 'OPEN')
     .map((issue) => ({
       id: issue.id,
       title: issue.title,
       isAssigned: !!issue.assignees.totalCount,
       resourcePath: issue.resourcePath,
       repo: `asyncapi/${issue.repository.name}`,
       author: issue.author.login,
       area: getLabel(issue, 'area/') || 'Unknown',
       labels: issue.labels!.nodes.filter(
         (label) => !label.name.startsWith('area/') && !label.name.startsWith('good first issue')
       ),
       state: issue.state
     }));
📝 Committable suggestion

‼️ 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.

Suggested change
async function mapGoodFirstIssues(issues: GoodFirstIssues[]): Promise<MappedIssue[]> {
return issues.map((issue) => ({
id: issue.id,
title: issue.title,
isAssigned: !!issue.assignees.totalCount,
resourcePath: issue.resourcePath,
repo: `asyncapi/${issue.repository.name}`,
author: issue.author.login,
area: getLabel(issue, 'area/') || 'Unknown',
labels: issue.labels!.nodes.filter(
(label) => !label.name.startsWith('area/') && !label.name.startsWith('good first issue')
)
}));
return issues
.filter((issue) => issue.state === 'OPEN')
.map((issue) => ({
id: issue.id,
title: issue.title,
isAssigned: !!issue.assignees.totalCount,
resourcePath: issue.resourcePath,
repo: `asyncapi/${issue.repository.name}`,
author: issue.author.login,
area: getLabel(issue, 'area/') || 'Unknown',
labels: issue.labels!.nodes.filter(
(label) => !label.name.startsWith('area/') && !label.name.startsWith('good first issue')
),
state: issue.state
}));
async function mapGoodFirstIssues(issues: GoodFirstIssues[]): Promise<MappedIssue[]> {
return issues
.filter((issue) => (issue.state ?? 'OPEN') === 'OPEN')
.map((issue) => ({
id: issue.id,
title: issue.title,
isAssigned: !!issue.assignees.totalCount,
resourcePath: issue.resourcePath,
repo: `asyncapi/${issue.repository.name}`,
author: issue.author.login,
area: getLabel(issue, 'area/') || 'Unknown',
labels: issue.labels!.nodes.filter(
(label) => !label.name.startsWith('area/') && !label.name.startsWith('good first issue')
),
state: issue.state
}));
}
🤖 Prompt for AI Agents
In `@scripts/dashboard/build-dashboard.ts` around lines 273 - 288, The new strict
filter in mapGoodFirstIssues is dropping legacy fixtures that omit state; update
the function mapGoodFirstIssues to handle missing state by treating undefined as
'OPEN' (e.g., use (issue.state ?? 'OPEN') === 'OPEN') or remove the filter and
handle state on MappedIssue consumers, and update any GoodFirstIssues test
fixtures to include state: 'OPEN' to keep tests deterministic; touch the
mapGoodFirstIssues implementation and related test fixtures (GoodFirstIssues /
MappedIssue) accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant