TODO: Add Support for Review Editing and Deletion in PullRequests (SZ-32)
rk@tigase.net opened 2 weeks ago

Summary

Currently, the ReviewController supports only POST for adding a review to a pull request and optionally a GET for listing reviews. There is no support for editing or deleting a review once created. This defect tracks the implementation of full CRUD functionality for reviews, particularly PUT and DELETE operations.


Background

Reviews are subordinate entities tied to Pull Requests (PRs). The existing endpoint pattern (/api/pullrequests/{prId}/reviews) conveys this subordination clearly and helps keep the API semantically organized. However, to fully support user workflows such as fixing a typo, updating comments, or removing reviews, the API must support:

  • PUT /api/pullrequests/{prId}/reviews/{reviewId}
  • DELETE /api/pullrequests/{prId}/reviews/{reviewId}

Tasks

  •  Create ReviewService interface.
  •  Implement ReviewServiceImpl with update/delete logic.
  •  Extend ReviewController:
    •  PUT endpoint to modify review content
    •  DELETE endpoint to remove review
  •  Add validation: only the review author (or admin) may edit/delete
  •  Add unit tests for new service methods
  •  Add unit tests for new controller endpoints

Out of Scope

  • UI changes for editing/deleting reviews (tracked separately)
  • Moderation workflows (e.g., admin hiding reviews)

Estimated Effort

6–8 hours, depending on complexity of validation and reuse of user security context


Comments

We deliberately scoped this out of the current regression push to keep the test surface small. Once base coverage is validated, we can come back to this enhancement.

issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Version
1.0
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
SZ-32
Please wait...
Page is in error, reload to recover