Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete review comments #23031

Closed
Zettat123 opened this issue Feb 21, 2023 · 0 comments · Fixed by #23036
Closed

Cannot delete review comments #23031

Zettat123 opened this issue Feb 21, 2023 · 0 comments · Fixed by #23036
Assignees
Labels

Comments

@Zettat123
Copy link
Contributor

Description

Steps to reproduce this bug:

  1. Create a PR
  2. Move to the "Files Changed" tab, click the "Review" button on the right, input a comment and click the "Comment" button.
  3. Move to the "Conversation" tab, delete this comment.
  4. Reload the page, the deleted comment still exists.

Gitea Version

development

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

development
can be reproduced at https://try.gitea.io/

Database

PostgreSQL

@Zettat123 Zettat123 self-assigned this Feb 21, 2023
lunny pushed a commit that referenced this issue Feb 21, 2023
Fix #23031.

Currently, only comments with type `CommentTypeComment` or
`CommentTypeCode` can be deleted. If user create a review comment, the
type of the comment will be `CommentTypeReview` so the comment cannot be
deleted.

https://github.com/go-gitea/gitea/blob/e7be610d5773e69abbfb98d19e23112dfad6dfcc/routers/web/repo/issue.go#L2860-L2868

And in Github, user also cannot delete a review comment. There isn't a
delete button in the menu.

<img
src="https://user-images.githubusercontent.com/15528715/220275166-5ae2dc10-4003-4857-b14e-d7b02644345f.png"
width="640px" />

So we should remove the delete button from the menu when the comment's
type is `CommentTypeReview`.
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant