-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix doctor deleting orphaned issues attachments #34142
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
base: main
Are you sure you want to change the base?
Conversation
@@ -323,3 +323,32 @@ func deleteIssue(ctx context.Context, issue *issues_model.Issue) error { | |||
|
|||
return committer.Commit() | |||
} | |||
|
|||
// DeleteOrphanedIssues delete issues without a repo | |||
func DeleteOrphanedIssues(ctx context.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can some codes above be used in this function?
e.g. also remove issue actions, other things which is assigned to the orphaned issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be. But that will need much more changes. This PR will only fix the bug when deleting attachments. That could be another PR.
Fix the bug when deleting orphaned issues attachments. The attachments maybe stored on other storages service rather than disk.