Summary

This PR implements inline code comments on individual commits, similar to the existing PR code review functionality.

Features

  • ✅ Add inline comments on any line of a commit diff
  • ✅ Edit and delete your own comments
  • ✅ Attachment support
  • ✅ @mention notifications
  • ✅ Works in both unified and split diff views

Implementation Details

  • Reuses existing Comment model infrastructure (CommitSHA, Line, TreePath already supported)
  • New service layer for commit comment CRUD operations
  • API routes: /commit/:sha/comments for create/update/delete
  • Templates updated to show comment UI when PageIsCommit is true
  • Existing PR comment JavaScript handles commit comments generically

Testing

  • ✅ Builds successfully without errors
  • Backend implementation follows existing PR comment patterns
  • Reuses PR comment templates and JavaScript

Fixes #4898

/claim #4898

Claim

Total prize pool $300
Total paid $0
Status Pending
Submitted October 05, 2025
Last updated October 05, 2025

Contributors

TA

Tamas Kalman

@ktamas77

100%

Sponsors

GI

Gitea

@go-gitea

$300