Skip to content

Conversation

lunny
Copy link
Member

@lunny lunny commented Mar 16, 2025

No description provided.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Mar 16, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 16, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Mar 16, 2025
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should stop here.

The design is wrong.

You can't make every function do "for repo" and "for wiki".

Since wiki is also a git repo, it should share the same repo interface as a code repo.

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 17, 2025
@wxiaoguang wxiaoguang dismissed their stale review March 27, 2025 07:33

dismiss

@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Mar 27, 2025
@lunny lunny changed the title Remove HasWiki method and use IsWikiRepositoryExist Remove HasWiki method and use IsRepositoryExist Mar 29, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 9, 2025
@lunny
Copy link
Member Author

lunny commented Jun 18, 2025

last call @go-gitea/technical-oversight-committee

@wxiaoguang
Copy link
Contributor

Is it possible to have a better design to avoid filling the code base with a lot of if err != nil { return err }? This simple PR +119 −44, in the future there will be more if err != nil { return err } and does it make code more readable or maintainable?

@lunny
Copy link
Member Author

lunny commented Jun 19, 2025

Maybe we have two options. One is to store the presence of the wiki in the repo_unit table and retrieve the information from the database each time. The other is to creating a HasWiki function under services/wiki, handle the error internally within this function, and return the result accordingly.

@wxiaoguang
Copy link
Contributor

And I believe we should introduce a better error handling framework.

image

@wxiaoguang
Copy link
Contributor

For this PR, I do not see why Remove HasWiki method makes sense or brings benefit.

I do not see any feasible plan for the "git repo" related refactoring work.

@lunny
Copy link
Member Author

lunny commented Jun 19, 2025

For this PR, I do not see why Remove HasWiki method makes sense or brings benefit.

I do not see any feasible plan for the "git repo" related refactoring work.

This PR will try to make all other packages just depend on the relative path of the repository except gitrepo package. Now the absolute repository path will be used everywhere which will prevent abstract of repository storage.

@wxiaoguang
Copy link
Contributor

which will prevent abstract of repository storage.

Most of your "abstract of repository storage" PRs are still incomplete. I do not see any feasible plan.

@lunny
Copy link
Member Author

lunny commented Aug 25, 2025

which will prevent abstract of repository storage.

Most of your "abstract of repository storage" PRs are still incomplete. I do not see any feasible plan.

The first step is to move all absolute repository paths into the gitrepo package, so that other packages will only reference repository paths relative to it. Since this involves extensive changes, I plan to break the work into multiple pull requests to make review easier.

Currently, absolute repository paths are used everywhere, which makes proper abstraction difficult.

I have updated proposal #29033 with more details about this plan.

@wxiaoguang
Copy link
Contributor

I have been tired of your infeasible plans, buggy code and stale PRs. So don't ask me to review.

@wxiaoguang
Copy link
Contributor

And, what is #29073, are we living in parallel universes ........

image image

@lunny
Copy link
Member Author

lunny commented Aug 25, 2025

And, what is #29073, are we living in parallel universes ........

image image

Sorry, it's #29033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants