Skip to content
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

Move almost all functions' parameter db.Engine to context.Context #19748

Merged
merged 18 commits into from May 20, 2022

Conversation

lunny
Copy link
Member

@lunny lunny commented May 18, 2022

As title.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label May 18, 2022
models/issue.go Outdated Show resolved Hide resolved
models/issue_label.go Outdated Show resolved Hide resolved
models/project/board.go Show resolved Hide resolved
models/repo/fork.go Outdated Show resolved Hide resolved
models/repo/user_repo.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 18, 2022
@lunny lunny force-pushed the lunny/move_engine branch 2 times, most recently from fb7277d to c5cf75b Compare May 19, 2022 02:10
models/issue_assignees.go Show resolved Hide resolved
models/issue_assignees.go Outdated Show resolved Hide resolved
services/issue/assignee.go Outdated Show resolved Hide resolved
models/action_list.go Show resolved Hide resolved
models/commit_status.go Show resolved Hide resolved
models/repo/mirror.go Show resolved Hide resolved
models/repo/pushmirror.go Show resolved Hide resolved
@6543 6543 added this to the 1.17.0 milestone May 19, 2022
@lunny lunny mentioned this pull request May 19, 2022
@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 May 19, 2022
@lunny lunny force-pushed the lunny/move_engine branch 2 times, most recently from 02b72c7 to 5240084 Compare May 20, 2022 06:12
@codecov-commenter

This comment was marked as outdated.

@lunny lunny requested a review from KN4CK3R May 20, 2022 07:35
@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 20, 2022

Generally L-G-T-M. But I do not understand why some PRs have rebase + force-push after the reviews have started.

In my mind, rebase + force-push only do harm to the project, it makes the review more difficult, and even worse it may lead to code lost.

@lunny
Copy link
Member Author

lunny commented May 20, 2022

Generally L-G-T-M. But I do not understand why some PRs have rebase + force-push after the reviews have started.

In my mind, rebase + force-push only do harm to the project, it makes the review more difficult, and even worse it may lead to code lost.

For me, that's because I'm also reviewing myself PR and found some code could be changed. Since Gitea asks to merge PR after updating, I have a habit to update the PR when possible to reduce the conflicts.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 20, 2022

But rebase doens't help about conflicts. A normal merge is enough for all cases, and the commit history is clear.

In some cases, a normal merge doesn't trigger conflicts, but rebase does. Rebase seems worse than a normal merge in such cases.

@wxiaoguang wxiaoguang mentioned this pull request May 20, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 20, 2022
@6543
Copy link
Member

6543 commented May 20, 2022

Please resolv conflict ;)

@lunny
Copy link
Member Author

lunny commented May 20, 2022

make L-G-T-M work.

@lunny lunny merged commit fd7d83a into go-gitea:main May 20, 2022
@lunny lunny deleted the lunny/move_engine branch May 20, 2022 14:08
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 20, 2022
* giteaofficial/main:
  Move almost all functions' parameter db.Engine to context.Context (go-gitea#19748)
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
…-gitea#19748)

* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. 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.

None yet

6 participants