Refactor commit discussions to use DiscussionsActions concern
Summary
The Projects::CommitController currently has logic for handling discussions that could be consolidated by using the RapidDiffs::DiscussionActions concern introduced in !214069 (merged).
Current State
After adding the POST discussions endpoint using the RapidDiffs::DiscussionActions concern, there are opportunities to refactor existing code:
- The
rapid_diffs_enabled?method is now available but not used in other parts of the controller - The
GET discussionsendpoint could potentially leverage the concern as well
Proposed Changes
- Refactor existing discussion-related code in
Projects::CommitControllerto use theRapidDiffs::DiscussionActionsconcern - Move the
GET discussionsendpoint to use the concern for consistency