0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-24 22:16:38 +02:00

2 Commits

Author SHA1 Message Date
yuvrajangadsingh
3a08115768 refactor: use Comment table with junction table for commit comments
Per @lunny's feedback, rework to reuse the existing Comment table
instead of a standalone commit_comment table. The junction table
(commit_comment) now only stores repo_id, commit_sha, comment_id.

Actual comment data (content, tree_path, line, patch, poster) lives
in the Comment table with Type = CommentTypeCommitComment (39).
This gives commit comments reactions, attachments, and all existing
comment infrastructure for free.
2026-04-02 16:55:52 +05:30
yuvrajangadsingh
b9c6802d09 feat: add inline comments on commit diffs
Add a new commit_comment table and full CRUD flow to support inline
comments on commit diff views, similar to PR review comments but
standalone (no issue/PR required).

Changes:
- New CommitComment model with migration (v326)
- Web handlers for rendering form, creating, and deleting comments
- Diff context patch generation for comment positioning
- Templates for commit comment conversation, individual comments, form
- Modified diff section templates to render existing commit comments
- Reuses existing JS for add-code-comment and delete-comment flows

Closes #4898
2026-04-02 16:55:52 +05:30