Feat add anonymous pr comment system with karma tracking and UI integration - #48
Conversation
…gration Agregado endpoint POST /v1/gh/:owner/:repo/pulls/:number/comments/anonymous para comentarios anónimos en Pull Requests. Implementada función CreateAnonymousPRComment() en internal/github/pr.go usando issues comments endpoint. Creado handler CreateAnonymousPRCommentHandler con validación de karma, cooldown por reportes y generación de hash anónimo. Agregada pestaña "PR Comment" en sección de issues con formulario compl
…th preventDefault Cambiado event listener de botón submit a formulario completo en sección de PR comments. Agregado preventDefault() para evitar recarga de página durante envío de comentarios anónimos.
…ing and force-push support Agregado sistema de actualización de PRs mediante pr-hash determinístico generado desde owner/repo/branch. Implementada función GeneratePRHash() en internal/github/pr.go usando SHA256 truncado a 8 caracteres. Creada función GetExistingPR() para verificar existencia de rama y PR abierto asociado. Modificado PushToGitHub() para aceptar targetBranch opcional y usar force-push cuando se actualiza rama
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis pull request introduces a PR hash tracking feature to enable updating existing pull requests instead of creating new ones. Changes span Git operations (modified function signatures to accept target branches and extract PR hashes), GitHub API helpers (deterministic hash generation and PR lookup), HTTP handlers (conditional PR update/creation logic), and frontend UI (PR update workflows and comment features). Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Handler as HTTP Handler
participant Git as Git Ops
participant GitHub as GitHub API
Client->>Handler: Push code with pr-hash
Handler->>Git: Call ReceivePack
Git->>Git: ExtractPackfile<br/>(extract pr-hash)
Git-->>Handler: newSHA, commitMsg, prHash, err
alt PR Hash Provided & Branch Exists
Handler->>GitHub: GetExistingPR<br/>(check for open PR)
GitHub-->>Handler: existingPRURL
Handler->>Git: PushToGitHub<br/>(targetBranch)
Git-->>Handler: Pushed to existing branch
Handler-->>Client: PR Updated<br/>(reuse existing PR)
else New PR Flow
Handler->>Git: PushToGitHub<br/>(auto-generate branch)
Git-->>Handler: Pushed to new branch
Handler->>GitHub: Create PR
GitHub-->>Handler: PR created
Handler->>Handler: GeneratePRHash<br/>(outPRHash)
Handler-->>Client: PR Created<br/>(with prHash)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
…arma-tracking-and-UI-integration
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes