Skip to content

Conversation

@karpfslp
Copy link

@karpfslp karpfslp commented Dec 15, 2025

🚨 Proposed changes

Please review the guidelines for contributing to this repository.

Add isGitlabAvailable filter to the entity cards.

⚙️ Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Refactor

Summary by CodeRabbit

  • Bug Fixes
    • GitLab cards now properly respect GitLab availability before rendering, preventing display issues when GitLab is unavailable.

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

Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Walkthrough

Added a new isGitlabAvailable import and filter condition to six GitLab card components in a single file. The filter gates card rendering to only display when GitLab is available, uniformly applied across readme, coverage, releases, merge-requests-stats, people, and languages cards without altering component logic.

Changes

Cohort / File(s) Summary
GitLab card availability filtering
packages/gitlab/src/alpha/cards.tsx
Added filter: isGitlabAvailable parameter to six EntityCardBlueprint definitions: gitlabReadmeCard, gitlabCoverageCard, gitlabReleasesCard, gitlabMergeRequestsStatsCard, gitlabPeopleCard, and gitlabLanguagesCard. New import added for isGitlabAvailable utility.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Straightforward, repetitive property addition across homogeneous card definitions
  • Single file modification with consistent pattern application
  • No complex logic changes or control flow modifications

Poem

🐰 Six cards now wear their filters bright,
When GitLab's here, they glow just right!
A simple gate, applied with care,
Availability rules everywhere! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding an isGitlabAvailable filter to entity cards, matching the core modification described in the changeset.
Description check ✅ Passed The description includes all required template sections with the main change clearly stated and an appropriate feature type selected, though the proposed changes section could be more detailed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e1f9b7 and ce594a4.

📒 Files selected for processing (1)
  • packages/gitlab/src/alpha/cards.tsx (6 hunks)
🔇 Additional comments (2)
packages/gitlab/src/alpha/cards.tsx (2)

4-4: Import looks consistent; just ensure export and dependency graph are clean

The isGitlabAvailable import is straightforward and keeps cards.tsx free of implementation details, assuming ../components already exports it and this doesn’t introduce a new circular dependency. Nothing blocking here.


9-15: Filter is correct and meets blueprint expectations

isGitlabAvailable is a pure predicate that reads Entity metadata annotations without side effects, matching exactly what EntityCardBlueprint.make requires. The consistent application across all six cards is correct.


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.

@simonecorsi
Copy link
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

2 participants