Skip to content

feat: auto-fetch GitHub stars for repo counters - #11

Open
gabrielbmoro wants to merge 3 commits into
mainfrom
feature/auto-github-stars
Open

gabrielbmoro wants to merge 3 commits into
mainfrom
feature/auto-github-stars

Conversation

@gabrielbmoro

Copy link
Copy Markdown
Contributor

Summary

  • Fetch star counts dynamically from GitHub API on page load
  • Update stat card total and per-repo stars automatically
  • Add multirepo entries for CraftD, eagle-eye, and jujubaSVG (previously missing)

Changes

  • app.js: Added fetchGitHubStars() and _applyGitHubStars() functions
  • library_content_data.js: Added multirepo entries for 3 libs without them

Behavior

  • On page load, fetches GitHub API for all CodandoTV repos
  • Updates the stat card with real sum of all stars
  • Mutates multirepo stars in memory and re-renders active tab
  • Fallback: if API fails, hardcoded values remain as-is (no breaking change)

Rate limit

  • 60 req/hour per IP without auth - sufficient for portfolio site traffic
  • Single API call per page load

- Add fetchGitHubStars() to dynamically fetch star counts from GitHub API
- Update stat card total and per-repo stars on page load
- Add multirepo entries for CraftD, eagle-eye, and jujubaSVG
- Fallback to hardcoded values if API call fails
video: true,
multirepo: []
multirepo: [
{ name: 'CraftD', stars: '82', url: 'https://github.com/CodandoTV/CraftD' }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fallback hard coded se falhar o request das estrelas

},
{
youtubeTitle: "Kotzilla no Compose Multiplatform: Setup Completo",
youtubeTitle: "Como Configurar o MCP da Kotzilla na Prática | IA com Contexto Real no Kotlin",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Atualizando pra ficar certinho (YouTube vs Site)

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