Skip to content

Release/0.3.3#28

Merged
mabd-dev merged 12 commits intomainfrom
release/0.3.3
Feb 13, 2026
Merged

Release/0.3.3#28
mabd-dev merged 12 commits intomainfrom
release/0.3.3

Conversation

@mabd-dev
Copy link
Copy Markdown
Owner

@mabd-dev mabd-dev commented Feb 13, 2026

Summary by CodeRabbit

  • New Features

    • Added 12 new badge color themes and show repository owner in top-contributions.
  • Improvements

    • Redesigned badge visuals with updated styling and layout.
    • Improved CLI error messages to include underlying details.
  • Bug Fixes

    • Fixed broken markdown link.
  • Documentation

    • README and docs updated to list expanded theme options and examples.
  • Tests

    • Updated tests and examples to reflect new themes and badge output size.
  • Chores

    • Ignored build/dist artifacts.

@mabd-dev
Copy link
Copy Markdown
Owner Author

@CodeRabbit

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 13, 2026

Tip

For best results, initiate chat on the files or code changes.

@mabd-dev, hello! How can I help you with this pull request? I can:

  • Review the changes in this PR
  • Answer questions about the code
  • Generate or modify code based on your requirements
  • Search the codebase for specific information
  • Create issues for follow-up work
  • Help with documentation or other tasks

Please let me know what you'd like me to do!

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Adds many new badge color themes, redesigns the detailed SVG badge template to explicit SVG structure, includes repository owner in contribution data, improves JSON error messages, updates documentation and release notes, and adjusts tests and example expectations.

Changes

Cohort / File(s) Summary
Repository config
\.gitignore
Added dist/ to ignored paths.
Documentation & release notes
README.md, docs/TECHNICAL.md, docs/badges/BADGE_THEMES.md, docs/release-notes/v0.3.3.md
Expanded theme listings and examples (display strings updated to indicate more themes); updated BADGE_THEMES content (many new theme entries) and added v0.3.3 release notes.
Badge theme definitions
pkg/ossstats/badge/badgeTheme.go
Introduced multiple new public theme constants (monokai, solarized-dark/light, tokyo-night variants, one-dark variants, catppuccin variants), extended ThemeFromName mappings and GetThemeColors palettes; updated default color values and error message referencing BADGE_THEMES.md.
Badge data & templates
pkg/ossstats/badge/badge.go, pkg/ossstats/badge/badgeTemplates/defaults.go
Added Owner string to contributionData; completely reworked DefaultDetailed SVG template from CSS-based approach to inline SVG structure with gradients, glass overlay, explicit positioning, and updated text/layout.
CLI error handling
cmd/gh-oss-stats/badgeCmd.go
Enhanced JSON parse error branches to include the underlying error message in output before exiting.
Tests & examples
pkg/ossstats/badge/badge_test.go, pkg/ossstats/badge/example_test.go
Adjusted expected theme colors, expanded a test to iterate over badge variants, and updated the expected generated SVG size in the example test.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~35 minutes

Poem

🐰 I hopped through palettes, bright and new,
From Monokai dusk to Catppuccin brew,
I swapped the CSS for glass and light,
Added owners so contributors shine bright,
Now badges sparkle in morning dew ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Release/0.3.3' is vague and generic, describing the release branch name rather than the substantive changes included in the pull request. Consider using a more descriptive title that summarizes the main changes, such as 'v0.3.3: Add new badge themes and improve badge rendering' or referencing the key feature additions.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/0.3.3

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
pkg/ossstats/badge/badgeTemplates/defaults.go (1)

256-265: Past review issue addressed: class="repo-name" is now correctly positioned.

The attribute is properly placed inside the <text> element's opening tag. Minor note: line 264 uses a tab character for indentation while the rest of the file uses spaces.

,

🧹 Optional: Consistent indentation
       font-size="16"
       font-weight="bold"
-	  class="repo-name"
+      class="repo-name"
       letter-spacing="0em">{{$r.RepoName}}</text>

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

Copy link
Copy Markdown

@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: 3

🤖 Fix all issues with AI agents
In `@docs/badges/BADGE_THEMES.md`:
- Around line 51-62: The table under the text-based theme rows in
BADGE_THEMES.md conflicts with the support note above that claims only the
detailed image is supported; either update that support note to state that
summary and compact variants are now available for "text-based" themes or remove
the Summary/Compact columns and images for rows that have "text-based" to
reflect only Detailed images. Locate the "text-based" rows (e.g., the rows
containing "text-based | monokai", "text-based | solarized-dark", etc.) and make
the documentation consistent by choosing one approach (update the explanatory
note text or strip the extra columns for all "text-based" entries) and ensure
the note wording and the table columns match.

In `@docs/release-notes/v0.3.3.md`:
- Around line 1-4: Update the header lines in the release notes: change the
title string "# Release Notes: v0.3.4" to "# Release Notes: v0.3.3" and correct
the "Release Date: Feb 13, 2025" line to "Release Date: Feb 13, 2026" (leave the
"Codename: Update template design + support 5 new color schemes" text as-is
unless intentionally different); ensure the file content now matches the file
name and PR version.

In `@pkg/ossstats/badge/badgeTemplates/defaults.go`:
- Around line 257-266: There's a stray text node 'class="repo-name"' emitted
after the <text> element which makes the SVG invalid; update the template in
defaults.go so the class attribute is part of the opening <text> tag (or remove
it entirely) — locate the <text ...>{{$r.RepoName}}</text> instance and either
add class="repo-name" inside that opening tag or delete the stray node so no
plain text attribute remains between elements.
🧹 Nitpick comments (1)
pkg/ossstats/badge/badge_test.go (1)

401-423: Include variant in failure output for easier debugging.

When a variant fails, the error message doesn’t identify which one. A small tweak improves diagnostics.

♻️ Optional tweak to add variant context
-				if err != nil {
-					t.Fatalf("RenderSVG() unexpected error: %v", err)
-				}
+				if err != nil {
+					t.Fatalf("RenderSVG() unexpected error for variant %v: %v", variant, err)
+				}
...
-				if count != tt.wantCount {
-					t.Errorf("RenderSVG() got %d repos, want %d", count, tt.wantCount)
-				}
+				if count != tt.wantCount {
+					t.Errorf("RenderSVG() got %d repos for variant %v, want %d", count, variant, tt.wantCount)
+				}

Comment thread docs/badges/BADGE_THEMES.md
Comment thread docs/release-notes/v0.3.3.md Outdated
Comment thread pkg/ossstats/badge/badgeTemplates/defaults.go
@mabd-dev mabd-dev merged commit a51da40 into main Feb 13, 2026
5 checks passed
@mabd-dev mabd-dev deleted the release/0.3.3 branch February 13, 2026 06:13
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