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

more context for models #19511

Merged
merged 21 commits into from
Apr 28, 2022
Merged

more context for models #19511

merged 21 commits into from
Apr 28, 2022

Conversation

6543
Copy link
Member

@6543 6543 commented Apr 26, 2022

make more usage of context, to have more db transaction in one session

(make diff of #9307 smaller)

@6543 6543 added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Apr 26, 2022
@6543 6543 added this to the 1.17.0 milestone Apr 26, 2022
@6543
Copy link
Member Author

6543 commented Apr 26, 2022

the end result will be to have it similar to what we do with the gitRepo for DB transactions ...

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 26, 2022
models/branches.go Outdated Show resolved Hide resolved
6543 and others added 3 commits April 26, 2022 23:54
@6543 6543 requested a review from zeripath April 26, 2022 22:26
models/branches_test.go Outdated Show resolved Hide resolved
models/issue_label_test.go Outdated Show resolved Hide resolved
@lunny
Copy link
Member

lunny commented Apr 27, 2022

Generally LGTM except some comments.

@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 27, 2022
@6543 6543 requested review from lunny and zeripath April 27, 2022 12:31
services/issue/label.go Outdated Show resolved Hide resolved
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.

WithContext could be more handy than TxContext in some cases.

@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 Apr 28, 2022
@6543
Copy link
Member Author

6543 commented Apr 28, 2022

:)

@6543 6543 merged commit 06e4687 into go-gitea:main Apr 28, 2022
@6543 6543 deleted the refactor-from-9307 branch April 28, 2022 11:48
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 29, 2022
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Support `hostname:port` to pass host matcher's check go-gitea#19543  (go-gitea#19543)
  Add "Allow edits from maintainer" feature (go-gitea#18002)
  Better describe what `/repos/{owner}/{repo}/raw/{filepath}` returns on 200 (go-gitea#19542)
  more context for models  (go-gitea#19511)
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
make more usage of context, to have more db transaction in one session

(make diff of  go-gitea#9307 smaller)
@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.

5 participants