-
-
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
Fix panic for fixBrokenRepoUnits16961
#30068
Conversation
yp05327
commented
Mar 25, 2024
Does doctor commands also have tests? |
Should this be backport? |
services/doctor/fix16961.go
Outdated
@@ -249,6 +249,8 @@ func fixBrokenRepoUnit16961(repoUnit *repo_model.RepoUnit, bs []byte) (fixed boo | |||
if fixed, err := fixIssuesConfig16961(bs, cfg); !fixed { | |||
return false, err | |||
} | |||
case unit.TypeActions: | |||
// action unit is newly added, so skip here |
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.
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 do not think the logic still make sense nowadays.
At least, it could first try to decode the JSON, if the decoding fails, then switch repoUnit.Type {}
and fix, and keep the old logic.
Because new units shouldn't/couldn't break, and never need to be fixed.
I was unable to create a backport for 1.21. @yp05327, please send one manually. 🍵
|
* origin/main: Remove jQuery `.attr` from the Fomantic modal cancel buttons (go-gitea#30113) Remove jQuery `.attr` from the code comments (go-gitea#30112) Remove jQuery calls that have no effect on `showElem` and `hideElem` (go-gitea#30110) Remove jQuery `.attr` from the common issue page functions (go-gitea#30083) Restore aligned grid column CSS (go-gitea#30106) Fix possible data race on tests (go-gitea#30093) Add svg linter and fix incorrect svgs (go-gitea#30086) Fix duplicate migrated milestones (go-gitea#30102) Update JS any PY dependencies, remove workarounds (go-gitea#30085) Fix gitea doctor will remove repo-avatar files when execute command `storage-archives` (go-gitea#30094) Fix alignment in actions right view (go-gitea#29979) Remove repetitive words (go-gitea#30091) Fix table header text-align (go-gitea#30084) Fix panic for `fixBrokenRepoUnits16961` (go-gitea#30068)