[INS-241] Fix filtering by repository on the widget data sources#120
[INS-241] Fix filtering by repository on the widget data sources#120
Conversation
WalkthroughThis pull request consolidates changes across various API endpoints and data source modules. Most modifications involve renaming the Changes
Possibly related PRs
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📥 CommitsReviewing files that changed from the base of the PR and between b76478716d7c9e3ea821cd86d9d0fa5927536b74 and a438407. 📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (13)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
58a9232 to
b764787
Compare
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 2
🧹 Nitpick comments (1)
frontend/server/api/project/[slug]/popularity/forks.get.ts (1)
25-30: Update code comments to reflect property name changeThe code comments still reference the old property name. Consider updating the comments to reflect the new naming convention.
/** * Query params: * - type: 'cumulative' | 'new' * - project: string - * - repository: string + * - repository: string (mapped to 'repo' internally) * - time-period: string // This is isn't defined yet, but we'll add '90d', '1y', '5y' for now */
🛑 Comments failed to post (2)
frontend/server/api/project/[slug]/contributors/organization-dependency.get.ts (1)
2-2:
⚠️ Potential issueFix import statement to use type import
The import of
OrganizationDependencyFiltershould use theimport typesyntax since it's only used as a type annotation.-import {FilterActivityMetric, FilterGranularity, OrganizationDependencyFilter} from "~~/server/data/types"; +import {FilterActivityMetric, FilterGranularity} from "~~/server/data/types"; +import type {OrganizationDependencyFilter} from "~~/server/data/types";📝 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.import {FilterActivityMetric, FilterGranularity} from "~~/server/data/types"; import type {OrganizationDependencyFilter} from "~~/server/data/types";🧰 Tools
🪛 GitHub Actions: Lint & Typescript Check
[error] 2-2: Imports "OrganizationDependencyFilter" are only used as type @typescript-eslint/consistent-type-imports
frontend/server/api/project/[slug]/contributors/contributor-dependency.get.ts (1)
3-3:
⚠️ Potential issueFix the type import syntax to resolve the linting error.
The linter is flagging an error because
ContributorDependencyFilteris only used as a type. To resolve this, you should useimport typesyntax.-import {ContributorDependencyFilter, FilterActivityMetric, FilterGranularity} from "~~/server/data/types"; +import {FilterActivityMetric, FilterGranularity} from "~~/server/data/types"; +import type {ContributorDependencyFilter} from "~~/server/data/types";📝 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.import {FilterActivityMetric, FilterGranularity} from "~~/server/data/types"; import type {ContributorDependencyFilter} from "~~/server/data/types";🧰 Tools
🪛 GitHub Actions: Lint & Typescript Check
[error] 3-3: Imports "ContributorDependencyFilter" are only used as type @typescript-eslint/consistent-type-imports
Signed-off-by: Raúl Santos <4837+borfast@users.noreply.github.com>
0ae4b3b to
a438407
Compare
Linear ticket
Due to the discrepancy between the variable names in the frontend and TinyBird, the
repository/repoparameter was not being correctly used to filter data from TinyBird. This PR fixes that.Summary by CodeRabbit
Refactor
Style
These internal improvements ensure that data queries and filtering work uniformly across various project statistics features, leading to enhanced system reliability and performance without changing the overall user experience.