-
-
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
Merge two functions with the same content #32805
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Zettat123 <zettat123@gmail.com>
if err != nil && !repo_model.IsErrRepoNotExist(err) { | ||
ctx.ServerError("GetForkedRepo", err) | ||
return | ||
} |
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.
The "merge" made code more complex than it should be.
I really dislike (hate) so many "if err { ServerError; return }" in code.
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.
Do you have any better idea? Just skip the error when getting a fork like before.
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.
Leave to 1.24?
Extract from #32786