Commit Graph

7 Commits

Author SHA1 Message Date
Vinta Chen
1ae889b4fd
fix: stricter GitHub owner/repo regexes and injection tests
Split _GITHUB_NAME_RE into separate owner and repo patterns.
Owner regex now rejects leading/trailing hyphens and dots (matching
GitHub's actual username rules). Repo regex requires alphanumeric
start but allows dots and underscores anywhere after.

New tests cover GraphQL injection attempts, invalid leading chars,
and valid hyphenated/underscore/dot combinations.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-30 15:03:06 +08:00
Vinta Chen
e71f38ef4e
test: add coverage for detect_source_type, format_stars_short, extract_entries, and last_commit_at parsing
Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-23 02:25:44 +08:00
Vinta Chen
f27b7c80fb
feat(website): add social proof line to hero with star count and build date
Display the awesome-python repo's star count (formatted as '230k+') and
the last data refresh date below the hero CTA. Fetches the self-repo
star count by always including vinta/awesome-python in the stars fetch.
Also removes the footer date stamp, which is now surfaced in the hero.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-23 01:56:15 +08:00
Vinta Chen
c5dd3060ef
chore: add __pycache__ to .gitignore and remove sys.path hack in tests
Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-23 01:43:12 +08:00
Vinta Chen
6148c13c0c
feat: skip fetching repos whose cache entry is still fresh
Introduce CACHE_MAX_AGE_HOURS (12 h) and filter current_repos before
the fetch loop so repos that were updated recently are not re-requested.
Prints a breakdown of fetched vs cached count.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 22:55:21 +08:00
Vinta Chen
af3baab2ed
refactor: consolidate load_cache into build.load_stars
load_cache was a duplicate of logic now living in build.load_stars.
Switch the call site to the shared helper and remove the redundant
local function and its tests.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 17:28:53 +08:00
Vinta Chen
177183d9bd
add custom website build system
Replaces MkDocs with a bespoke Python site generator using Jinja2 templates
and Markdown. Adds uv for dependency management, GitHub Actions workflow for
deployment, and Makefile targets for local development (fetch_stars, build,
preview, deploy).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 13:48:49 +08:00