feat(gamification): leaderboard gamification for fun - #53
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a new publish CLI command that generates a user progress snapshot, writes a JSON file under contrib/leaderboard/progress, updates the README leaderboard section, and automates creating a PR to an upstream repo (via gh when available). README gains usage/docs, badges updated, and a Leaderboard section is introduced. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as CLI (golearn)
participant Pub as runPublish
participant Git as Git (temp clone)
participant GH as gh CLI
participant Repo as Upstream Repo
User->>CLI: golearn publish [--repo --user --branch --dry-run]
CLI->>Pub: dispatch with args
Pub->>Pub: parse flags, buildProgressSnapshot()
alt --dry-run
Pub-->>User: Print snapshot JSON and manual steps
else publish
Pub->>Git: git clone upstream into temp dir
Pub->>Git: git checkout -b <branch>
Pub->>Git: write contrib/leaderboard/progress/<user>.json
Pub->>Git: update README between START/END_LEADERBOARD
Pub->>Git: git add/commit/push (to fork or branch)
alt gh available and authenticated
Pub->>GH: gh pr create (base: upstream, head: user branch)
GH->>Repo: Create PR
GH-->>Pub: PR URL / status
Pub-->>User: Report PR details
else gh unavailable or unauthenticated
Pub-->>User: Print manual PR instructions and pushed branch
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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. Comment |
Summary by CodeRabbit
New Features
Documentation