-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[API] Allow removing issues #18879
[API] Allow removing issues #18879
Conversation
Signed-off-by: fnetx <git@fralix.ovh>
Signed-off-by: fnetx <git@fralix.ovh>
Ah it's also in the comments table, my database viewer didn't properly reload. Still, I wonder why this isn't removed. |
Leftover attachments and issues that can't be closed would probably be the most important issues. Everything else should be cleaned up by consistency checks in case it really fails.
Currently not properly cleaned up: actions. They show up as broken in the user dashboard ("500 when get issue"). In the deleteComment function they are set to "is_deleted" here: https://github.com/go-gitea/gitea/blob/main/models/issue_comment.go#L1172 This touches my first review question. Should I
|
I have sent a commit ref. https://github.com/fnetX/gitea/pull/2/commits/8cfb88cd594509c7bbcbd94f2e4db8db0b062c03 |
Dammit, mis-click. Didn't approve the PR. |
@lunny thank you, just got to reading your commit. I left a comment in the commit regarding the deleteIn() function. I hope you can read it. |
The "Issue opened" action is not deleted from the table yet. I think it would be okay to keep it (it includes the title and doesn't fail, also it might be interesting that a user opened a certain issue. OTOH, it includes the title and thus maybe information people want to get rid of. I don't really know how to cleanly remove this? Maybe the repo ID and then where content starts with "issue_id|" so it matches e.g. "5|Issue title"? Or is there already a convenient function for this? Didn't find one. Should I also try to match the op_type, or can this be any? |
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
I think the op_type's are the way to go. There a quite a few which relates to issues. |
* giteaofficial/main: [API] Allow removing issues (go-gitea#18879) Refactor SecToTime() function (go-gitea#18863) Improve mirror iterator (go-gitea#18928) Fix login with email panic when email is not exist (go-gitea#18941)
Add new feature to delete issues and pulls via API Co-authored-by: fnetx <git@fralix.ovh> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: 6543 <6543@obermui.de>
Add new feature to delete issues and pulls via API Co-authored-by: fnetx <git@fralix.ovh> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: 6543 <6543@obermui.de>
First steps to address #18056 and #923. I hope to get to a simple UI, too, but I'm looking for feedback for this technical aspects.